Installazione e caricamento dei pacchetti
#install.packages("ggpubr", dependencies=TRUE)
library(ggplot2)
library(ggpubr)
library(dplyr)
##
## Caricamento pacchetto: 'dplyr'
## I seguenti oggetti sono mascherati da 'package:stats':
##
## filter, lag
## I seguenti oggetti sono mascherati da 'package:base':
##
## intersect, setdiff, setequal, union
library(epitools)
library(DescTools)
library(survival)
##
## Caricamento pacchetto: 'survival'
## Il seguente oggetto è mascherato da 'package:epitools':
##
## ratetable
library(survminer)
##
## Caricamento pacchetto: 'survminer'
## Il seguente oggetto è mascherato da 'package:survival':
##
## myeloma
library(epiR)
## Package epiR 2.0.60 is loaded
## Type help(epi.about) for summary information
## Type browseVignettes(package = 'epiR') to learn how to use epiR for applied epidemiological analyses
##
Il presente progetto si propone di esaminare quattro dataset relativi alla situazione sanitaria di una piccola cittadina tedesca nel periodo compreso tra il 1984 e il 1988. I dataset che andremo ad analizzare sono:
In questa prima fase l’obiettivo è quello di riportare le statistiche descrittive in una tabella per ciascun dataset, con particolare attenzione alla presenza di dati mancanti, incongruenze tra date e record ripetuti che potrebbero creare problemi in fase di linkage e analisi. Saranno segnalati nel report i record con dati ripetuti o incongruenze tra date e saranno eliminati per le analisi successive.
cancer<-read.csv("https://raw.githubusercontent.com/lucasammarini/public-health-german-cancer/main/dataset/Cancerregister.csv", header = TRUE, sep =";")
death<-read.csv("https://raw.githubusercontent.com/lucasammarini/public-health-german-cancer/main/dataset/Deathregister.csv", header = TRUE, sep =";")
GermanH<-read.csv("https://raw.githubusercontent.com/lucasammarini/public-health-german-cancer/main/dataset/GermanH.csv", header = TRUE, sep =";")
sdo<-read.csv("https://raw.githubusercontent.com/lucasammarini/public-health-german-cancer/main/dataset/SDO.csv", header = TRUE, sep =";")
head(cancer)
## idnum Stadio incidenza tipotumore geneticm
## 1 3 Stadio II 13/01/1984 polmone 0
## 2 4 Stadio II 13/01/1984 altro 0
## 3 5 Stadio II 13/01/1984 seno 0
## 4 6 Stadio II 12/01/1984 seno 0
## 5 7 Stadio I 14/01/1984 altro 0
## 6 8 Stadio IV 18/01/1984 altro 0
head(death)
## idnum dead enddate
## 1 1 0 1988-12-31
## 2 2 0 1988-12-31
## 3 3 0 1988-12-30
## 4 4 1 1985-12-17
## 5 5 0 1987-08-07
## 6 6 0 1988-10-25
head(GermanH)
## idnum smoke sex married kids work education age
## 1 1 yes Female yes no no medium/high 45
## 2 2 no Female yes no no low 44
## 3 3 no Female no no no low 38
## 4 4 yes Female no no no <NA> 52
## 5 5 no Female no no no medium/high 49
## 6 6 no Female no no no <NA> 46
head(sdo)
## idnum Prestazione dataprestazione dimissione ospedale
## 1 1933 chirurgica 07/04/1984 19/07/1984 8
## 2 10076 chemioterapica 31/03/1984 08/07/1984 8
## 3 10096 chirurgica 25/02/1984 16/07/1984 2
## 4 79 chirurgica 12/05/1984 28/08/1984 4
## 5 10475 chirurgica 13/04/1984 17/08/1984 8
## 6 11010 chirurgica 06/03/1984 23/07/1984 5
Controllo dei duplicati.
cancer$idnum[duplicated(cancer$idnum)]
## [1] 192 363 1933
cancer[cancer$idnum== 192,]
## idnum Stadio incidenza tipotumore geneticm
## 158 192 Stadio IV 20/01/1984 seno 0
## 159 192 Stadio IV 20/01/1984 seno 0
cancer[cancer$idnum== 363,]
## idnum Stadio incidenza tipotumore geneticm
## 305 363 Stadio II 14/01/1984 seno 0
## 306 363 Stadio II 14/01/1984 seno 0
cancer[cancer$idnum== 1933,]
## idnum Stadio incidenza tipotumore geneticm
## 1639 1933 Stadio I 15/01/1984 seno 0
## 1640 1933 Stadio I 15/01/1984 seno 0
Rimozione dei duplicati.
cancer <- cancer[-158, ]
cancer <- cancer[-305,]
cancer <- cancer[-1637, ]
Controllo della rimozione dei duplicati.
cancer[cancer$idnum== 363,]
## idnum Stadio incidenza tipotumore geneticm
## 305 363 Stadio II 14/01/1984 seno 0
cancer[cancer$idnum== 192,]
## idnum Stadio incidenza tipotumore geneticm
## 159 192 Stadio IV 20/01/1984 seno 0
cancer[cancer$idnum== 1933,]
## idnum Stadio incidenza tipotumore geneticm
## 1640 1933 Stadio I 15/01/1984 seno 0
Si convertono gli spazi vuoti in valori nulli, poiché essi sono dati mancanti.
cancer <- data.frame(lapply(cancer, function(x) ifelse(x == "", NA, x)), stringsAsFactors = FALSE)
Controllo e rimozione dei valori nulli.
sum(is.na(cancer))
## [1] 15
cancer[!complete.cases(cancer),]
## idnum Stadio incidenza tipotumore geneticm
## 484 582 Stadio I <NA> seno 0
## 984 1162 Stadio II <NA> seno 0
## 1065 1260 <NA> 17/01/1984 altro 0
## 3458 4111 <NA> <NA> <NA> 0
## 4260 5072 <NA> <NA> <NA> 0
## 4283 5102 <NA> <NA> <NA> 0
## 4689 5594 <NA> 20/01/1984 colon 0
## 4854 5804 <NA> 16/01/1984 altro 0
## 5521 6606 <NA> 17/01/1984 altro 0
cancer <- na.omit(cancer)
Ordinamento dei dati in base alla data di incidenza del tumore.
cancer_clean <- cancer[order(cancer$incidenza),]
head(cancer_clean)
## idnum Stadio incidenza tipotumore geneticm
## 9 11 Stadio II 11/01/1984 seno 0
## 24 29 Stadio I 11/01/1984 polmone 0
## 25 30 Stadio II 11/01/1984 seno 0
## 31 37 Stadio II 11/01/1984 polmone 0
## 32 38 Stadio III 11/01/1984 seno 0
## 37 48 Stadio II 11/01/1984 altro 0
cancer_clean$Stadio <- as.factor(cancer_clean$Stadio)
cancer_clean$tipotumore <- as.factor(cancer_clean$tipotumore)
cancer_clean$geneticm <- as.factor(cancer_clean$geneticm)
cancer_clean$incidenza <- as.Date(cancer_clean$incidenza, tryFormats = "%d/%m/%Y" )
Controllo ed esplorazione del dataset pulito.
str(cancer_clean)
## 'data.frame': 9993 obs. of 5 variables:
## $ idnum : int 11 29 30 37 38 48 72 79 129 137 ...
## $ Stadio : Factor w/ 4 levels "Stadio I","Stadio II",..: 2 1 2 2 3 2 2 1 1 2 ...
## $ incidenza : Date, format: "1984-01-11" "1984-01-11" ...
## $ tipotumore: Factor w/ 4 levels "altro","colon",..: 4 3 4 3 4 1 4 4 4 1 ...
## $ geneticm : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
## - attr(*, "na.action")= 'omit' Named int [1:9] 484 984 1065 3458 4260 4283 4689 4854 5521
## ..- attr(*, "names")= chr [1:9] "484" "984" "1065" "3458" ...
summary(cancer_clean)
## idnum Stadio incidenza tipotumore geneticm
## Min. : 3 Stadio I :1605 Min. :1984-01-11 altro :3247 0:8879
## 1st Qu.: 2967 Stadio II :5505 1st Qu.:1984-01-13 colon :2061 1:1114
## Median : 5989 Stadio III:1197 Median :1984-01-15 polmone:2072
## Mean : 5978 Stadio IV :1686 Mean :1984-01-15 seno :2613
## 3rd Qu.: 8968 3rd Qu.:1984-01-18
## Max. :12000 Max. :1984-01-20
Esportazione del dataset pulito.
write.csv(cancer_clean, "dataset/Cancerregister_clean.csv", row.names= FALSE)
Si procede all’esplorazione del dataset attraverso alcuni grafici.
Grafico a barre della distribuzione dei pazienti per stadio del tumore.
ggplot(cancer_clean, aes(x=Stadio, fill=Stadio)) +
geom_bar() +
ylab("Numero di pazienti")
Grafico a barre della distribuzione dei pazienti per tipo di tumore.
ggplot(cancer_clean, aes(x=tipotumore, fill=tipotumore)) +
geom_bar()+
ylab("Numero di pazienti")+
xlab("Tipo di tumore")
Grafico a barre della distribuzione dei pazienti per fattore genetico.
ggplot(cancer_clean, aes(x=geneticm, fill=geneticm)) +
geom_bar()+
ylab("Numero di pazienti")+
xlab("Presenza di fattore genetico")
Le due classi sono sbilanciate tra loro.
str(death)
## 'data.frame': 7748 obs. of 3 variables:
## $ idnum : int 1 2 3 4 5 6 7 8 9 10 ...
## $ dead : int 0 0 0 1 0 0 1 1 1 1 ...
## $ enddate: chr "1988-12-31" "1988-12-31" "1988-12-30" "1985-12-17" ...
Correzione del formato delle colonne ‘dead’ e ‘enddate’.
death$dead = as.factor(death$dead)
death$enddate = as.Date(death$enddate, tryFormats = "%Y-%m-%d" )
str(death)
## 'data.frame': 7748 obs. of 3 variables:
## $ idnum : int 1 2 3 4 5 6 7 8 9 10 ...
## $ dead : Factor w/ 2 levels "0","1": 1 1 1 2 1 1 2 2 2 2 ...
## $ enddate: Date, format: "1988-12-31" "1988-12-31" ...
summary(death)
## idnum dead enddate
## Min. : 1 0:5130 Min. :1984-06-29
## 1st Qu.:1938 1:2618 1st Qu.:1985-11-12
## Median :3874 Median :1987-05-27
## Mean :3874 Mean :1987-03-31
## 3rd Qu.:5811 3rd Qu.:1988-11-05
## Max. :7748 Max. :1988-12-31
dim(death)
## [1] 7748 3
names(death)
## [1] "idnum" "dead" "enddate"
Controllo dei dati mancanti.
sum(is.na(death))
## [1] 0
Non sono presenti dati mancanti.
Controllo dei duplicati.
sum(duplicated(death))
## [1] 0
length(unique(death$idnum)) == length(death$idnum)
## [1] TRUE
Non sono presenti duplicati.
Si procede all’esplorazione del dataset attraverso alcuni grafici.
ggplot(death, aes(x = dead, fill = dead)) +
geom_bar() +
labs(title = "Distribuzione dei decessi",
x = "Stato del paziente (0 = vivo, 1 = morto)",
y = "Numero di pazienti")
str(GermanH)
## 'data.frame': 7748 obs. of 8 variables:
## $ idnum : int 1 2 3 4 5 6 7 8 9 10 ...
## $ smoke : chr "yes" "no" "no" "yes" ...
## $ sex : chr "Female" "Female" "Female" "Female" ...
## $ married : chr "yes" "yes" "no" "no" ...
## $ kids : chr "no" "no" "no" "no" ...
## $ work : chr "no" "no" "no" "no" ...
## $ education: chr "medium/high" "low" "low" NA ...
## $ age : int 45 44 38 52 49 46 62 44 29 35 ...
Si analizza quanti valori nulli sono presenti nelle singole colonne.
colSums(is.na(GermanH))
## idnum smoke sex married kids work education age
## 0 0 0 22 14 0 36 0
Eliminazione dei valori nulli.
GermanH_ok <- na.omit(GermanH)
Controllo della riuscita.
colSums(is.na(GermanH_ok))
## idnum smoke sex married kids work education age
## 0 0 0 0 0 0 0 0
Ricerca dei duplicati.
nrow(GermanH_ok[duplicated(GermanH_ok$idnum),])
## [1] 0
Non sono presenti duplicati.
Correzione del formato delle colonne.
GermanH_ok$smoke <- as.factor(GermanH_ok$smoke)
GermanH_ok$sex <- as.factor(GermanH_ok$sex)
GermanH_ok$married <- as.factor(GermanH_ok$married)
GermanH_ok$kids <- as.factor(GermanH_ok$kids)
GermanH_ok$work <- as.factor(GermanH_ok$work)
GermanH_ok$education <- as.factor(GermanH_ok$education)
str(GermanH_ok)
## 'data.frame': 7676 obs. of 8 variables:
## $ idnum : int 1 2 3 5 12 18 19 20 21 22 ...
## $ smoke : Factor w/ 2 levels "no","yes": 2 1 1 1 2 1 1 1 1 1 ...
## $ sex : Factor w/ 2 levels "Female","Male": 1 1 1 1 1 1 1 1 1 1 ...
## $ married : Factor w/ 2 levels "no","yes": 2 2 1 1 2 2 2 2 2 2 ...
## $ kids : Factor w/ 2 levels "no","yes": 1 1 1 1 2 1 1 1 2 1 ...
## $ work : Factor w/ 2 levels "no","yes": 1 1 1 1 1 1 1 1 1 1 ...
## $ education: Factor w/ 2 levels "low","medium/high": 2 1 1 2 2 1 2 1 2 1 ...
## $ age : int 45 44 38 49 62 42 37 62 45 48 ...
## - attr(*, "na.action")= 'omit' Named int [1:72] 4 6 7 8 9 10 11 13 14 15 ...
## ..- attr(*, "names")= chr [1:72] "4" "6" "7" "8" ...
summary(GermanH_ok)
## idnum smoke sex married kids work
## Min. : 1 no :6099 Female:3835 no :1676 no :4222 no :7206
## 1st Qu.:1950 yes:1577 Male :3841 yes:6000 yes:3454 yes: 470
## Median :3874
## Mean :3887
## 3rd Qu.:5823
## Max. :7748
## education age
## low :6888 Min. : 26.00
## medium/high: 788 1st Qu.: 41.00
## Median : 45.50
## Mean : 48.21
## 3rd Qu.: 54.00
## Max. :108.00
Esportazione del dataset pulito.
write.csv(GermanH_ok, "dataset/GermanH_clean.csv", row.names= FALSE)
Esplorazione del dataset pulito attraverso grafici.
colors <- c("#FFA07A", "#ADD8E6")
barplot(table(GermanH_ok$smoke), main="Numero di pazienti per fumo", xlab="Fumatore", ylab="Numero dei pazienti", col= colors)
barplot(table(GermanH_ok$sex), main="Numero di pazienti per genere", xlab="Genere", ylab="Numero dei pazienti", col = colors)
barplot(table(GermanH_ok$married), main="Numero di pazienti per stato sociale", xlab="Coniugato", ylab="Numero dei pazienti", col = colors)
barplot(table(GermanH_ok$kids), main="Numero di pazienti per presenza di figli ", xlab="Ha figli?", ylab="Numero dei pazienti", col= colors)
barplot(table(GermanH_ok$work), main="Numero di pazienti per disoccupazione", xlab="Lavora?", ylab="Numero dei pazienti", col = colors)
ggplot(GermanH_ok, aes(age)) +
geom_bar(fill = "#0073C2FF")+xlab('Età')+ylab("Numero dei pazienti")
str(sdo)
## 'data.frame': 10002 obs. of 5 variables:
## $ idnum : int 1933 10076 10096 79 10475 11010 4402 1788 11318 3164 ...
## $ Prestazione : chr "chirurgica" "chemioterapica" "chirurgica" "chirurgica" ...
## $ dataprestazione: chr "07/04/1984" "31/03/1984" "25/02/1984" "12/05/1984" ...
## $ dimissione : chr "19/07/1984" "08/07/1984" "16/07/1984" "28/08/1984" ...
## $ ospedale : int 8 8 2 4 8 5 8 3 3 9 ...
summary(sdo)
## idnum Prestazione dataprestazione dimissione
## Min. : 3 Length:10002 Length:10002 Length:10002
## 1st Qu.: 2966 Class :character Class :character Class :character
## Median : 5986 Mode :character Mode :character Mode :character
## Mean : 5976
## 3rd Qu.: 8966
## Max. :12000
## ospedale
## Min. :1.000
## 1st Qu.:3.000
## Median :5.000
## Mean :5.007
## 3rd Qu.:7.000
## Max. :9.000
Ordinamento del dataset.
sdo <- sdo[order(sdo$idnum), ]
Controllo dei duplicati.
nrow(sdo[duplicated(sdo$idnum),])
## [1] 0
Formattazione delle colonne.
sdo$Prestazione <- as.factor(sdo$Prestazione)
sdo$ospedale <- as.factor(sdo$ospedale)
sdo$dataprestazione <- as.Date(sdo$dataprestazione, '%d/%m/%Y')
sdo$dimissione <- as.Date(sdo$dimissione, '%d/%m/%Y')
summary(sdo)
## idnum Prestazione dataprestazione
## Min. : 3 chemioterapica:1988 Min. :1984-01-22
## 1st Qu.: 2966 chirurgica :3318 1st Qu.:1984-02-19
## Median : 5986 radioterapica :4696 Median :1984-03-08
## Mean : 5976 Mean :1984-03-19
## 3rd Qu.: 8966 3rd Qu.:1984-04-09
## Max. :12000 Max. :1984-10-07
## NA's :1
## dimissione ospedale
## Min. :1984-06-22 1 :1150
## 1st Qu.:1984-07-17 7 :1126
## Median :1984-08-02 8 :1119
## Mean :1984-08-12 9 :1119
## 3rd Qu.:1984-09-01 6 :1110
## Max. :1985-02-12 5 :1107
## NA's :3 (Other):3271
Controllo dei valori nulli.
nrow(sdo[is.na(sdo$Prestazione),])
## [1] 0
nrow(sdo[is.na(sdo$dataprestazione),])
## [1] 1
sdo[is.na(sdo$dataprestazione),]
## idnum Prestazione dataprestazione dimissione ospedale
## 9378 7261 radioterapica <NA> 1984-07-08 1
nrow(sdo[is.na(sdo$dimissione),])
## [1] 3
sdo[is.na(sdo$dimissione),]
## idnum Prestazione dataprestazione dimissione ospedale
## 4263 567 chirurgica 1984-02-13 <NA> 9
## 17 2633 chemioterapica 1984-02-22 <NA> 6
## 7 4402 chemioterapica 1984-02-29 <NA> 8
nrow(sdo[is.na(sdo$ospedale),])
## [1] 0
Eliminazione dei valori nulli.
sdo.no.na <- sdo[!is.na(sdo$dataprestazione) & !is.na(sdo$dimissione), ]
nrow(sdo.no.na[is.na(sdo.no.na$Prestazione),])
## [1] 0
nrow(sdo.no.na[is.na(sdo.no.na$dataprestazione),])
## [1] 0
nrow(sdo.no.na[is.na(sdo.no.na$dimissione),])
## [1] 0
nrow(sdo.no.na[is.na(sdo.no.na$ospedale),])
## [1] 0
Controllo della presenza di incongruenze tra date e rimozione dei valori incongruenti.
nrow(sdo.no.na[sdo.no.na$dataprestazione>sdo.no.na$dimissione, ])
## [1] 42
sdo.no.na[sdo.no.na$dataprestazione>sdo.no.na$dimissione, ]
## idnum Prestazione dataprestazione dimissione ospedale
## 5705 180 radioterapica 1984-08-01 1984-07-01 7
## 1103 245 chemioterapica 1984-07-19 1984-07-17 1
## 3096 334 chirurgica 1984-07-20 1984-07-06 1
## 7929 1108 radioterapica 1984-07-07 1984-07-02 4
## 5161 1252 radioterapica 1984-08-03 1984-08-02 8
## 6691 1498 chirurgica 1984-07-18 1984-07-11 9
## 3916 1616 chirurgica 1984-08-16 1984-07-25 8
## 3303 1776 chemioterapica 1984-06-25 1984-06-22 1
## 3840 1980 radioterapica 1984-07-30 1984-07-20 5
## 8483 2046 radioterapica 1984-07-10 1984-06-29 6
## 3054 2243 chemioterapica 1984-07-24 1984-07-20 7
## 1152 2336 chirurgica 1984-09-05 1984-07-18 2
## 1057 2813 radioterapica 1984-09-19 1984-09-13 3
## 8560 3647 radioterapica 1984-08-25 1984-07-19 7
## 8738 3923 chirurgica 1984-07-30 1984-07-09 7
## 7360 4379 chirurgica 1984-08-06 1984-07-22 8
## 809 4456 chirurgica 1984-07-15 1984-07-01 3
## 5373 4631 chirurgica 1984-08-08 1984-07-05 1
## 3980 4764 radioterapica 1984-08-12 1984-07-21 4
## 3726 4986 radioterapica 1984-08-11 1984-07-02 9
## 8072 5255 radioterapica 1984-07-25 1984-07-24 4
## 8520 5358 radioterapica 1984-08-27 1984-07-26 2
## 746 5377 radioterapica 1984-07-22 1984-07-21 6
## 5096 5917 radioterapica 1984-07-28 1984-07-20 9
## 2967 5943 chirurgica 1984-07-20 1984-07-13 5
## 3429 6287 radioterapica 1984-08-08 1984-07-04 5
## 6826 7500 chirurgica 1984-08-26 1984-07-16 2
## 8033 7545 radioterapica 1984-09-06 1984-07-04 1
## 5267 7673 chirurgica 1984-08-09 1984-07-30 6
## 7841 8083 radioterapica 1984-10-05 1984-07-31 9
## 1129 8468 chemioterapica 1984-07-15 1984-07-01 9
## 5918 9429 radioterapica 1984-08-27 1984-08-14 4
## 8651 9590 chemioterapica 1984-07-17 1984-07-11 1
## 8621 9620 chirurgica 1984-07-25 1984-07-11 6
## 2158 10093 radioterapica 1984-08-23 1984-07-10 1
## 6634 10270 radioterapica 1984-07-20 1984-07-07 8
## 8069 10368 chemioterapica 1984-07-24 1984-07-11 2
## 9069 10400 chirurgica 1984-08-10 1984-07-28 1
## 5010 10588 radioterapica 1984-08-10 1984-07-07 2
## 8531 11020 chirurgica 1984-07-12 1984-07-08 7
## 3116 11379 chirurgica 1984-07-17 1984-07-11 2
## 2188 11996 chirurgica 1984-07-12 1984-07-06 5
sdo.ok <- sdo.no.na[sdo.no.na$dataprestazione<sdo.no.na$dimissione, ]
Statistiche del dataset pulito.
summary(sdo.ok)
## idnum Prestazione dataprestazione
## Min. : 3 chemioterapica:1980 Min. :1984-01-22
## 1st Qu.: 2972 chirurgica :3301 1st Qu.:1984-02-19
## Median : 5991 radioterapica :4674 Median :1984-03-08
## Mean : 5979 Mean :1984-03-18
## 3rd Qu.: 8966 3rd Qu.:1984-04-09
## Max. :12000 Max. :1984-10-07
##
## dimissione ospedale
## Min. :1984-06-23 1 :1141
## 1st Qu.:1984-07-17 7 :1121
## Median :1984-08-02 8 :1114
## Mean :1984-08-12 9 :1113
## 3rd Qu.:1984-09-01 6 :1105
## Max. :1985-02-12 5 :1103
## (Other):3258
Esportazione del dataset pulito.
write.csv(sdo.ok, "dataset/SDO_clean.csv", row.names= FALSE)
Esplorazione del dataset pulito attraverso grafici.
ggplot(sdo, aes(Prestazione)) +
geom_bar(fill = "#0073C2FF") +
theme_pubclean()+ylab("Numero dei pazienti")
ggplot(sdo, aes(ospedale)) +
geom_bar(fill = "#0073C2FF") +
theme_pubclean()+ylab("Numero dei pazienti")+xlab("Ospedali")
I dataset sono stati tutti puliti e controllati ed è stata svolta un’analisi esplorativa iniziale. Ora si può passare alla fase di linkage dei dataset per eseguire gli altri task.
Denominatore: tutte le pazienti di sesso femminile con tumore al seno insorto tra 01/01/1984 e 31/01/1984, in stadio I o II, che hanno subito un intervento chirurgico Numeratore: tutte le pazienti al denominatore con intervallo tra la data d’incidenza e la data dell’intervento ≤60 giorni
data_sdo = read.csv("dataset/SDO_clean.csv", header = TRUE, sep =",")
data_cancer = read.csv("dataset/Cancerregister_clean.csv", header=TRUE, sep = ",")
dataMerge=merge(data_cancer, data_sdo, by="idnum")
dataMerge$incidenza = as.Date(dataMerge$incidenza, format = "%Y-%m-%d")
dataMerge$dataprestazione= as.Date(dataMerge$dataprestazione)
dataMerge$dimissione= as.Date(dataMerge$dimissione)
data_gerH = read.csv("dataset/GermanH_clean.csv", header=TRUE, sep = ",")
dataMerge2 = merge(dataMerge, data_gerH, by='idnum')
#pulizia
dataMerge2$Prestazione <- as.factor(dataMerge2$Prestazione)
dataMerge2$ospedale <- as.factor(dataMerge2$ospedale)
dataMerge2$Stadio <- as.factor(dataMerge2$Stadio)
dataMerge2$tipotumore <- as.factor(dataMerge2$tipotumore)
dataMerge2$geneticm <- as.factor(dataMerge2$geneticm)
dataMerge2$smoke <- as.factor(dataMerge2$smoke)
dataMerge2$sex <- as.factor(dataMerge2$sex)
dataMerge2$married <- as.factor(dataMerge2$married)
dataMerge2$kids <- as.factor(dataMerge2$kids)
dataMerge2$work <- as.factor(dataMerge2$work)
dataMerge2$education <- as.factor(dataMerge2$education)
summary(dataMerge2)
## idnum Stadio incidenza tipotumore geneticm
## Min. : 3 Stadio I :1005 Min. :1984-01-11 altro :2477 0:5775
## 1st Qu.:1931 Stadio II :3510 1st Qu.:1984-01-13 colon :1300 1: 604
## Median :3855 Stadio III: 776 Median :1984-01-15 polmone:1347
## Mean :3881 Stadio IV :1088 Mean :1984-01-15 seno :1255
## 3rd Qu.:5834 3rd Qu.:1984-01-18
## Max. :7748 Max. :1984-01-20
##
## Prestazione dataprestazione dimissione ospedale
## chemioterapica:1219 Min. :1984-01-25 Min. :1984-06-23 1 : 740
## chirurgica :2109 1st Qu.:1984-02-19 1st Qu.:1984-07-17 7 : 724
## radioterapica :3051 Median :1984-03-08 Median :1984-08-02 8 : 724
## Mean :1984-03-18 Mean :1984-08-12 6 : 720
## 3rd Qu.:1984-04-10 3rd Qu.:1984-09-01 9 : 714
## Max. :1984-09-06 Max. :1985-02-12 5 : 699
## (Other):2058
## smoke sex married kids work education
## no :5090 Female:3203 no :1388 no :3490 no :5983 low :5717
## yes:1289 Male :3176 yes:4991 yes:2889 yes: 396 medium/high: 662
##
##
##
##
##
## age
## Min. : 26.00
## 1st Qu.: 40.00
## Median : 45.00
## Mean : 48.17
## 3rd Qu.: 54.00
## Max. :108.00
##
Per costruire l’indicatore, il denominatore deve soddisfare i seguenti critieri di inclusione: 1. sex: female 2. tipotumore: seno 3. Stadio: Stadio I, Stadio II 4. incidenza: dal 1984-01-01 al 1984-01-31 5. prestazione: chirurgica
Al numeratore invece, verranno incluse solamente le pazienti che hanno subito un intervento entro 60 giorni dalla data d’incidenza. Verrà quindi creata una nuova variabile binaria per indicare la presenza dell’evento o meno.
#denominatore
data = dataMerge2[dataMerge2$sex == 'Female',]
data = data[data$Stadio == 'Stadio I' | data$Stadio == 'Stadio II',]
data = data[data$tipotumore=='seno', ]
data = data[data$Prestazione=='chirurgica',]
summary(data)
## idnum Stadio incidenza tipotumore geneticm
## Min. : 21 Stadio I : 71 Min. :1984-01-11 altro : 0 0:280
## 1st Qu.: 861 Stadio II :240 1st Qu.:1984-01-13 colon : 0 1: 31
## Median :2055 Stadio III: 0 Median :1984-01-14 polmone: 0
## Mean :1905 Stadio IV : 0 Mean :1984-01-14 seno :311
## 3rd Qu.:2832 3rd Qu.:1984-01-17
## Max. :3863 Max. :1984-01-20
##
## Prestazione dataprestazione dimissione ospedale
## chemioterapica: 0 Min. :1984-01-29 Min. :1984-06-26 4 :46
## chirurgica :311 1st Qu.:1984-02-22 1st Qu.:1984-07-14 8 :43
## radioterapica : 0 Median :1984-03-10 Median :1984-08-02 1 :39
## Mean :1984-03-21 Mean :1984-08-12 9 :37
## 3rd Qu.:1984-04-14 3rd Qu.:1984-08-29 3 :33
## Max. :1984-07-27 Max. :1985-01-11 6 :33
## (Other):80
## smoke sex married kids work education
## no :246 Female:311 no : 57 no :161 no :290 low :269
## yes: 65 Male : 0 yes:254 yes:150 yes: 21 medium/high: 42
##
##
##
##
##
## age
## Min. :29.00
## 1st Qu.:40.00
## Median :45.00
## Mean :47.92
## 3rd Qu.:54.00
## Max. :86.00
##
dim(data)
## [1] 311 16
La variabile ‘incidenza’ soddisfa già i criteri di inclusione. Come possiamo notare dalle statistiche descrittive, la data è compresa tra l’11/01/1984 e il 20/01/1984.
Al numeratore verranno incluse tutte le pazienti del denominatore che hanno subito l’intervento entro 60 giorni.
Attraverso il seguente codice, si aggiunge la variabile “intervallo” per calcolare il numero di giorni fra la data di prestazione e la data di incidenza.
data$intervallo = as.numeric(data$dataprestazione - data$incidenza)
summary(data$intervallo)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 9.00 38.50 54.00 67.13 92.00 193.00
Osservando la nuova variabile ‘intervallo’ possiamo notare che il tempo minimo di attesa per la prestazione è pari a 9 giorni, invece il tempo massimo di attesa equivale a 193 giorni.
In seguito, viene creata la variabile binaria ‘intervento60gg’ per individuare le osservazioni che hanno subito o meno l’intervento entro 60 giorni.
data$intervento60gg = ifelse(data$intervallo <= 60, 1, 0)
T1 = table(data$intervento60gg); T1 #indicatore tumore seno
##
## 0 1
## 139 172
prop.table(T1)
##
## 0 1
## 0.4469453 0.5530547
indicatore = T1[2]/(T1[2]+T1[1]) #
indicatore
## 1
## 0.5530547
L’indicatore è pari a 0.55. La percentuale di interventi entro 60 giorni dalla data di diagnosi è pari al 55%.
table(data$ospedale)
##
## 1 2 3 4 5 6 7 8 9
## 39 28 33 46 23 33 29 43 37
#indicatore grezzo
TT<-table(evento = data$intervento60gg, ospedale = data$ospedale);TT
## ospedale
## evento 1 2 3 4 5 6 7 8 9
## 0 21 10 17 22 10 15 11 16 17
## 1 18 18 16 24 13 18 18 27 20
prop.table(TT,2) #indicatore seconda posizione evento 1
## ospedale
## evento 1 2 3 4 5 6 7
## 0 0.5384615 0.3571429 0.5151515 0.4782609 0.4347826 0.4545455 0.3793103
## 1 0.4615385 0.6428571 0.4848485 0.5217391 0.5652174 0.5454545 0.6206897
## ospedale
## evento 8 9
## 0 0.3720930 0.4594595
## 1 0.6279070 0.5405405
data$intervento60gg = as.factor(data$intervento60gg)
#indicatore grezzo
ggplot(data, aes(x = ospedale, fill = intervento60gg)) +
geom_bar(position = "fill") +
xlab("Ospedale") +
ylab("Frazione eventi") +
ggtitle("Frazione di eventi per ospedale")
theme_classic()
## List of 97
## $ line :List of 6
## ..$ colour : chr "black"
## ..$ linewidth : num 0.5
## ..$ linetype : num 1
## ..$ lineend : chr "butt"
## ..$ arrow : logi FALSE
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_line" "element"
## $ rect :List of 5
## ..$ fill : chr "white"
## ..$ colour : chr "black"
## ..$ linewidth : num 0.5
## ..$ linetype : num 1
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_rect" "element"
## $ text :List of 11
## ..$ family : chr ""
## ..$ face : chr "plain"
## ..$ colour : chr "black"
## ..$ size : num 11
## ..$ hjust : num 0.5
## ..$ vjust : num 0.5
## ..$ angle : num 0
## ..$ lineheight : num 0.9
## ..$ margin : 'margin' num [1:4] 0points 0points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : logi FALSE
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ title : NULL
## $ aspect.ratio : NULL
## $ axis.title : NULL
## $ axis.title.x :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 1
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 2.75points 0points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.title.x.top :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 0
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 2.75points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.title.x.bottom : NULL
## $ axis.title.y :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 1
## ..$ angle : num 90
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 2.75points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.title.y.left : NULL
## $ axis.title.y.right :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 0
## ..$ angle : num -90
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 0points 2.75points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.text :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : chr "grey30"
## ..$ size : 'rel' num 0.8
## ..$ hjust : NULL
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.text.x :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 1
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 2.2points 0points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.text.x.top :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 0
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 2.2points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.text.x.bottom : NULL
## $ axis.text.y :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : num 1
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 2.2points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.text.y.left : NULL
## $ axis.text.y.right :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : num 0
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 0points 2.2points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.ticks :List of 6
## ..$ colour : chr "grey20"
## ..$ linewidth : NULL
## ..$ linetype : NULL
## ..$ lineend : NULL
## ..$ arrow : logi FALSE
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_line" "element"
## $ axis.ticks.x : NULL
## $ axis.ticks.x.top : NULL
## $ axis.ticks.x.bottom : NULL
## $ axis.ticks.y : NULL
## $ axis.ticks.y.left : NULL
## $ axis.ticks.y.right : NULL
## $ axis.ticks.length : 'simpleUnit' num 2.75points
## ..- attr(*, "unit")= int 8
## $ axis.ticks.length.x : NULL
## $ axis.ticks.length.x.top : NULL
## $ axis.ticks.length.x.bottom: NULL
## $ axis.ticks.length.y : NULL
## $ axis.ticks.length.y.left : NULL
## $ axis.ticks.length.y.right : NULL
## $ axis.line :List of 6
## ..$ colour : chr "black"
## ..$ linewidth : 'rel' num 1
## ..$ linetype : NULL
## ..$ lineend : NULL
## ..$ arrow : logi FALSE
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_line" "element"
## $ axis.line.x : NULL
## $ axis.line.x.top : NULL
## $ axis.line.x.bottom : NULL
## $ axis.line.y : NULL
## $ axis.line.y.left : NULL
## $ axis.line.y.right : NULL
## $ legend.background :List of 5
## ..$ fill : NULL
## ..$ colour : logi NA
## ..$ linewidth : NULL
## ..$ linetype : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_rect" "element"
## $ legend.margin : 'margin' num [1:4] 5.5points 5.5points 5.5points 5.5points
## ..- attr(*, "unit")= int 8
## $ legend.spacing : 'simpleUnit' num 11points
## ..- attr(*, "unit")= int 8
## $ legend.spacing.x : NULL
## $ legend.spacing.y : NULL
## $ legend.key : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ legend.key.size : 'simpleUnit' num 1.2lines
## ..- attr(*, "unit")= int 3
## $ legend.key.height : NULL
## $ legend.key.width : NULL
## $ legend.text :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : 'rel' num 0.8
## ..$ hjust : NULL
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ legend.text.align : NULL
## $ legend.title :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : num 0
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ legend.title.align : NULL
## $ legend.position : chr "right"
## $ legend.direction : NULL
## $ legend.justification : chr "center"
## $ legend.box : NULL
## $ legend.box.just : NULL
## $ legend.box.margin : 'margin' num [1:4] 0cm 0cm 0cm 0cm
## ..- attr(*, "unit")= int 1
## $ legend.box.background : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ legend.box.spacing : 'simpleUnit' num 11points
## ..- attr(*, "unit")= int 8
## $ panel.background :List of 5
## ..$ fill : chr "white"
## ..$ colour : logi NA
## ..$ linewidth : NULL
## ..$ linetype : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_rect" "element"
## $ panel.border : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ panel.spacing : 'simpleUnit' num 5.5points
## ..- attr(*, "unit")= int 8
## $ panel.spacing.x : NULL
## $ panel.spacing.y : NULL
## $ panel.grid :List of 6
## ..$ colour : chr "grey92"
## ..$ linewidth : NULL
## ..$ linetype : NULL
## ..$ lineend : NULL
## ..$ arrow : logi FALSE
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_line" "element"
## $ panel.grid.major : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ panel.grid.minor : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ panel.grid.major.x : NULL
## $ panel.grid.major.y : NULL
## $ panel.grid.minor.x : NULL
## $ panel.grid.minor.y : NULL
## $ panel.ontop : logi FALSE
## $ plot.background :List of 5
## ..$ fill : NULL
## ..$ colour : chr "white"
## ..$ linewidth : NULL
## ..$ linetype : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_rect" "element"
## $ plot.title :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : 'rel' num 1.2
## ..$ hjust : num 0
## ..$ vjust : num 1
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 5.5points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ plot.title.position : chr "panel"
## $ plot.subtitle :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : num 0
## ..$ vjust : num 1
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 5.5points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ plot.caption :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : 'rel' num 0.8
## ..$ hjust : num 1
## ..$ vjust : num 1
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 5.5points 0points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ plot.caption.position : chr "panel"
## $ plot.tag :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : 'rel' num 1.2
## ..$ hjust : num 0.5
## ..$ vjust : num 0.5
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ plot.tag.position : chr "topleft"
## $ plot.margin : 'margin' num [1:4] 5.5points 5.5points 5.5points 5.5points
## ..- attr(*, "unit")= int 8
## $ strip.background :List of 5
## ..$ fill : chr "white"
## ..$ colour : chr "black"
## ..$ linewidth : 'rel' num 2
## ..$ linetype : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_rect" "element"
## $ strip.background.x : NULL
## $ strip.background.y : NULL
## $ strip.clip : chr "inherit"
## $ strip.placement : chr "inside"
## $ strip.text :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : chr "grey10"
## ..$ size : 'rel' num 0.8
## ..$ hjust : NULL
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 4.4points 4.4points 4.4points 4.4points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ strip.text.x : NULL
## $ strip.text.x.bottom : NULL
## $ strip.text.x.top : NULL
## $ strip.text.y :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : NULL
## ..$ angle : num -90
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ strip.text.y.left :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : NULL
## ..$ angle : num 90
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ strip.text.y.right : NULL
## $ strip.switch.pad.grid : 'simpleUnit' num 2.75points
## ..- attr(*, "unit")= int 8
## $ strip.switch.pad.wrap : 'simpleUnit' num 2.75points
## ..- attr(*, "unit")= int 8
## - attr(*, "class")= chr [1:2] "theme" "gg"
## - attr(*, "complete")= logi TRUE
## - attr(*, "validate")= logi TRUE
Come si evince dal grafico sovrastante, gli ospedali 2, 7 e 8 sono quelli con percentuale maggiore relativa alle osservazioni che hanno subito l’evento, rispettivamente pari a 64%, 62% e 63%. L’ospedale 1, invece, presenta la percentuale minore di osservazioni che hanno subito l’evento, pari a 46%.
Nella tabella seguente vengono riportati gli indicatori per ospedale.
indice <- data %>%
group_by(ospedale)%>%
summarise(indice=sum(intervento60gg == 1)/n())
indice
## # A tibble: 9 × 2
## ospedale indice
## <fct> <dbl>
## 1 1 0.462
## 2 2 0.643
## 3 3 0.485
## 4 4 0.522
## 5 5 0.565
## 6 6 0.545
## 7 7 0.621
## 8 8 0.628
## 9 9 0.541
bar_plot = ggplot(indice, aes(x = reorder(ospedale, indice), y = indice)) +
geom_bar(stat = "identity", fill = "darkgreen") +
xlab("Ospedale") +
ylab("Indicatore") +
ggtitle("Indicatore per ospedale") +
theme(plot.title = element_text(size = 14, hjust = 0.5),
axis.text.x = element_text(angle = 0, vjust = 0, hjust=0.5)) +
geom_hline(yintercept = indicatore, linetype='dashed', color='black')
bar_plot
Considerando il valore dell’indicatore di riferimento, calcolato in precedenza sull’intero dataset, pari a 0.55, gli ospedali 2, 5, 7, 8 presentano un valore superiore. Invece, gli ospedali 1, 3, 4, 6, 9 presentano un valore inferiore.
Per valutare l’associazione tra il livello di educazione e l’intervento chirurgico di asportazione del tumore al seno entro 60 giorni dalla diagnosi, è possibile utilizzare una tabella di contingenza dove vengono riportati i valori che indicano il numero di casi che rientrano in ogni combinazione di categoria di educazione e di intervento chirurgico.
tabella_contingenza <- table(data$education, data$intervento60gg)
tabella_contingenza
##
## 0 1
## low 120 149
## medium/high 19 23
OR <- (tabella_contingenza[1,1]/tabella_contingenza[1,2])/(tabella_contingenza[2,1]/tabella_contingenza[2,2])
OR
## [1] 0.9749205
La misura di effetto che è possibile stimare in questo caso è l’ODDS Ratio, esso ci permette di confrontare le probabilità di un evento tra due gruppi. In particolare, in questo caso si vuole confrontare la probabilità che una donna con un basso livello di educazione abbia un intervento chirurgico di asportazione del tumore al seno entro 60 giorni dalla diagnosi con la probabilità che una donna con un medio/alto livello di educazione abbia lo stesso intervento entro lo stesso periodo.
epitab(data$education, data$intervento60gg, method = c("oddsratio"))
## $tab
## Outcome
## Predictor 0 p0 1 p1 oddsratio lower upper p.value
## low 120 0.8633094 149 0.8662791 1.0000000 NA NA NA
## medium/high 19 0.1366906 23 0.1337209 0.9749205 0.5072007 1.873952 1
##
## $measure
## [1] "wald"
##
## $conf.level
## [1] 0.95
##
## $pvalue
## [1] "fisher.exact"
Come si evince dal risultato sovrastante, l’ODDS ratio è pari a 0.97, con un intervallo di confidenza (0.51, 1.87); poiché l’intervallo di confidenza include il valore 1, non è possibile concludere che l’ODDS ratio sia significativamente diverso da 1.
L’ODDS ratio può essere calcolato anche attraverso un modello logistico:
modello_logistico_seno <- glm(intervento60gg ~ education, family = binomial(), data = data)
# Riepilogo del modello
summary(modello_logistico_seno)
##
## Call:
## glm(formula = intervento60gg ~ education, family = binomial(),
## data = data)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.2165 0.1227 1.765 0.0776 .
## educationmedium/high -0.0254 0.3334 -0.076 0.9393
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 427.63 on 310 degrees of freedom
## Residual deviance: 427.62 on 309 degrees of freedom
## AIC: 431.62
##
## Number of Fisher Scoring iterations: 3
#Lettura Coefficienti
exp(cbind("OR" = coef(modello_logistico_seno), confint.default(modello_logistico_seno, level = 0.95)))
## OR 2.5 % 97.5 %
## (Intercept) 1.2416667 0.9763374 1.579102
## educationmedium/high 0.9749205 0.5072023 1.873947
I risultati coincidono nei tre metodi utilizzati.
Per calcolare l’OR tramite il metodo Mantel Haenszel viene costruita una tabella di contingenza per i due gruppi in base allo stato lavorativo.
tabella_contingenza_1 <- table(education = data$education, evento = data$intervento60gg, work = data$work)
tabella_contingenza_1
## , , work = no
##
## evento
## education 0 1
## low 110 140
## medium/high 19 21
##
## , , work = yes
##
## evento
## education 0 1
## low 10 9
## medium/high 0 2
Per verificare la possibilità di utilizzare l’OR di Mantel Haenszel viene utilizzato il test di Breslow-Day, il quale testa l’omogeneità degli ODDS ratio nei due gruppi.
BreslowDayTest(tabella_contingenza_1)
##
## Breslow-Day test on Homogeneity of Odds Ratios
##
## data: tabella_contingenza_1
## X-squared = 2.1712, df = 1, p-value = 0.1406
Il test non rifiuta l’ipotesi nulla di omogeneità; si può proseguire nel calcolo dell’OR.
OR_adj <- mantelhaen.test(tabella_contingenza_1, conf.level = 0.95)
OR_adj
##
## Mantel-Haenszel chi-squared test without continuity correction
##
## data: tabella_contingenza_1
## Mantel-Haenszel X-squared = 0.0071823, df = 1, p-value = 0.9325
## alternative hypothesis: true common odds ratio is not equal to 1
## 95 percent confidence interval:
## 0.5068658 1.8649396
## sample estimates:
## common odds ratio
## 0.9722521
L’OR di Mantel Haenszel non è significativamente diverso da 1, controllando per la variabile ‘working’. Inoltre, il rapporto fra l’ ODDS ratio crudo e quello di Mantel Haenszel è pari a circa 1.00. Questo significa che lo stato lavorativo non è un confondente nell’associazione tra il livello di educazione e l’intervento chirurgico di asportazione del tumore al seno entro 60 giorni dalla data di diagnosi.
modello <- glm(intervento60gg ~ education, data = data, family = binomial())
summary(modello)
##
## Call:
## glm(formula = intervento60gg ~ education, family = binomial(),
## data = data)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.2165 0.1227 1.765 0.0776 .
## educationmedium/high -0.0254 0.3334 -0.076 0.9393
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 427.63 on 310 degrees of freedom
## Residual deviance: 427.62 on 309 degrees of freedom
## AIC: 431.62
##
## Number of Fisher Scoring iterations: 3
exp(cbind("OR" = coef(modello), confint.default(modello, level = 0.95)))
## OR 2.5 % 97.5 %
## (Intercept) 1.2416667 0.9763374 1.579102
## educationmedium/high 0.9749205 0.5072023 1.873947
Una delle variabili che si é ritenuto considerare come confondente è “geneticm”.
modello_gen<- glm(intervento60gg ~ education + geneticm, data = data, family = binomial())
summary(modello_gen)
##
## Call:
## glm(formula = intervento60gg ~ education + geneticm, family = binomial(),
## data = data)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.15104 0.12745 1.185 0.2360
## educationmedium/high -0.06166 0.33642 -0.183 0.8546
## geneticm1 0.75483 0.41410 1.823 0.0683 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 427.63 on 310 degrees of freedom
## Residual deviance: 424.05 on 308 degrees of freedom
## AIC: 430.05
##
## Number of Fisher Scoring iterations: 4
exp(cbind("OR" = coef(modello_gen), confint.default(modello_gen, level = 0.95)))
## OR 2.5 % 97.5 %
## (Intercept) 1.1630460 0.9059649 1.493078
## educationmedium/high 0.9402006 0.4862537 1.817934
## geneticm1 2.1272575 0.9447982 4.789620
ratio_gen = exp(coef(modello)['educationmedium/high'])/exp(coef(modello_gen)['educationmedium/high'])
ratio_gen
## educationmedium/high
## 1.036928
Ciò nonostante, il rapporto fra l’OR crudo e quello di MH è pari a circa 1.04. Ciò significa che non è un confondente.
modello_stadio <- glm(intervento60gg ~ education + Stadio , data = data, family = binomial())
summary(modello_stadio)
##
## Call:
## glm(formula = intervento60gg ~ education + Stadio, family = binomial(),
## data = data)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.54063 0.24921 -2.169 0.030058 *
## educationmedium/high -0.07106 0.34007 -0.209 0.834477
## StadioStadio II 0.99107 0.27983 3.542 0.000398 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 427.63 on 310 degrees of freedom
## Residual deviance: 414.59 on 308 degrees of freedom
## AIC: 420.59
##
## Number of Fisher Scoring iterations: 4
exp(cbind("OR" = coef(modello_stadio), confint.default(modello_stadio, level = 0.95)))
## OR 2.5 % 97.5 %
## (Intercept) 0.5823822 0.3573355 0.9491613
## educationmedium/high 0.9314041 0.4782672 1.8138679
## StadioStadio II 2.6941197 1.5567719 4.6623922
ratio_stadio = exp(coef(modello)['educationmedium/high'])/exp(coef(modello_stadio)['educationmedium/high'])
ratio_stadio
## educationmedium/high
## 1.046721
Un’altra variabile presa in considerazione come possibile confondente è “Stadio”. Si osserva che, anche in questo caso, il rapporto tra fra l’OR crudo e quello di MH è pari a circa 1.05. Ciò significa che la variabile non è un confondente.
Infine, si va a controllare per la variabile ‘age’ suddivisa in 5 intervalli.
classe_1 <- 28
classe_2 <- 42
classe_3 <- 56
classe_4 <- 70
classe_5 <- 84
classe_6 <- 98
data$age_class <- as.factor(cut(data$age, breaks = c(classe_1, classe_2, classe_3, classe_4, classe_5, classe_6), labels = FALSE))
modello_age <- glm(intervento60gg ~ education + age_class, data = data, family = binomial())
summary(modello_age)
##
## Call:
## glm(formula = intervento60gg ~ education + age_class, family = binomial(),
## data = data)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.23779 0.18857 1.261 0.207
## educationmedium/high -0.02708 0.33504 -0.081 0.936
## age_class2 -0.17167 0.25511 -0.673 0.501
## age_class3 0.19214 0.36264 0.530 0.596
## age_class4 0.30407 0.50993 0.596 0.551
## age_class5 14.32828 882.74340 0.016 0.987
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 427.63 on 310 degrees of freedom
## Residual deviance: 424.75 on 305 degrees of freedom
## AIC: 436.75
##
## Number of Fisher Scoring iterations: 13
exp(cbind("OR" = coef(modello_age), confint.default(modello_age, level = 0.95)))
## OR 2.5 % 97.5 %
## (Intercept) 1.268443e+00 0.8765222 1.835603
## educationmedium/high 9.732858e-01 0.5047199 1.876853
## age_class2 8.422552e-01 0.5108494 1.388656
## age_class3 1.211843e+00 0.5953434 2.466750
## age_class4 1.355358e+00 0.4988838 3.682212
## age_class5 1.669906e+06 0.0000000 Inf
ratio_age = exp(coef(modello)['educationmedium/high'])/exp(coef(modello_age)['educationmedium/high'])
ratio_age
## educationmedium/high
## 1.00168
Anche in questo caso, la variabile scelta, ‘age’, non è un confondente.
L’analisi è stata eseguita su tutte le persone del dataset.
dim(data)
## [1] 311 19
Le persone del dataset sono 291.
Nessuna delle variabili analizzate risulta essere un confondente per la variabile “education”. La variabile “education”, inoltre, non è associata all’indicatore. Tuttavia, la variabile “Stadio” risulta essere positivamente associata all’indicatore: l’OR risulta significativamente superiore a 1.
data_death = read.csv("dataset/Deathregister.csv", header = TRUE, sep =";")
data_cancer = read.csv("dataset/Cancerregister_clean.csv", header=TRUE, sep = ",")
dataMerge3 = merge(data_cancer, data_death, by="idnum")
data_gerH = read.csv("dataset/GermanH_clean.csv", header=TRUE, sep = ",")
dataMerge4 = merge(dataMerge3, data_gerH, by='idnum')
## Pulizia
dataMerge4$incidenza <- as.Date(dataMerge4$incidenza, format = "%Y-%m-%d")
dataMerge4$enddate <- as.Date(dataMerge4$enddate, format = "%Y-%m-%d")
dataMerge4$Stadio <- as.factor(dataMerge4$Stadio)
dataMerge4$tipotumore <- as.factor(dataMerge4$tipotumore)
dataMerge4$geneticm <- as.factor(dataMerge4$geneticm)
dataMerge4$smoke <- as.factor(dataMerge4$smoke)
dataMerge4$sex <- as.factor(dataMerge4$sex)
dataMerge4$married <- as.factor(dataMerge4$married)
dataMerge4$kids <- as.factor(dataMerge4$kids)
dataMerge4$work <- as.factor(dataMerge4$work)
dataMerge4$education <- as.factor(dataMerge4$education)
dataMerge4$dead <- as.factor(dataMerge4$dead)
summary(dataMerge4)
## idnum Stadio incidenza tipotumore geneticm
## Min. : 3 Stadio I :1011 Min. :1984-01-11 altro :2497 0:5807
## 1st Qu.:1929 Stadio II :3532 1st Qu.:1984-01-13 colon :1304 1: 606
## Median :3855 Stadio III: 777 Median :1984-01-15 polmone:1352
## Mean :3880 Stadio IV :1093 Mean :1984-01-15 seno :1260
## 3rd Qu.:5831 3rd Qu.:1984-01-18
## Max. :7748 Max. :1984-01-20
## dead enddate smoke sex married kids
## 0:3830 Min. :1984-06-29 no :5113 Female:3220 no :1394 no :3507
## 1:2583 1st Qu.:1985-08-17 yes:1300 Male :3193 yes:5019 yes:2906
## Median :1986-11-22
## Mean :1986-11-26
## 3rd Qu.:1988-02-21
## Max. :1988-12-30
## work education age
## no :6015 low :5747 Min. : 26.00
## yes: 398 medium/high: 666 1st Qu.: 40.00
## Median : 45.00
## Mean : 48.16
## 3rd Qu.: 54.00
## Max. :108.00
colon <- dataMerge4[dataMerge4$tipotumore=="colon",]
length(colon[colon$incidenza>colon$enddate])
## [1] 0
dim(colon)
## [1] 1304 14
Nell’analisi sono inclusi 1304 soggetti.
table(colon$dead)
##
## 0 1
## 597 707
Nel periodo di interesse sono morti 707 pazienti.
Si stima la sopravvivenza di Kaplan-Meier, che viene rappresentata graficamente.
colon$survtime <- as.numeric(colon$enddate-colon$incidenza)/365.25
fit<-survfit(Surv(survtime, as.numeric(dead)) ~1,data=colon)
summary(fit)
## Call: survfit(formula = Surv(survtime, as.numeric(dead)) ~ 1, data = colon)
##
## time n.risk n.event survival std.err lower 95% CI upper 95% CI
## 0.515 1304 1 0.999 0.000767 0.998 1.000
## 0.548 1302 1 0.998 0.001084 0.996 1.000
## 0.586 1301 1 0.998 0.001327 0.995 1.000
## 0.589 1300 1 0.997 0.001532 0.994 1.000
## 0.591 1299 1 0.996 0.001713 0.993 1.000
## 0.597 1298 2 0.995 0.002025 0.991 0.999
## 0.608 1296 1 0.994 0.002164 0.990 0.998
## 0.613 1294 1 0.993 0.002294 0.989 0.998
## 0.619 1293 1 0.992 0.002418 0.988 0.997
## 0.641 1289 1 0.992 0.002536 0.987 0.997
## 0.646 1288 1 0.991 0.002648 0.986 0.996
## 0.649 1287 1 0.990 0.002755 0.985 0.995
## 0.660 1286 2 0.988 0.002958 0.983 0.994
## 0.671 1282 1 0.988 0.003055 0.982 0.994
## 0.682 1279 1 0.987 0.003149 0.981 0.993
## 0.687 1275 2 0.985 0.003329 0.979 0.992
## 0.709 1271 1 0.985 0.003415 0.978 0.991
## 0.715 1270 1 0.984 0.003499 0.977 0.991
## 0.731 1269 1 0.983 0.003581 0.976 0.990
## 0.734 1267 1 0.982 0.003662 0.975 0.989
## 0.739 1266 1 0.982 0.003740 0.974 0.989
## 0.758 1264 1 0.981 0.003817 0.973 0.988
## 0.769 1262 1 0.980 0.003892 0.972 0.988
## 0.783 1260 1 0.979 0.003966 0.971 0.987
## 0.805 1254 1 0.978 0.004039 0.971 0.986
## 0.808 1253 2 0.977 0.004181 0.969 0.985
## 0.816 1251 2 0.975 0.004317 0.967 0.984
## 0.830 1249 1 0.974 0.004384 0.966 0.983
## 0.832 1248 2 0.973 0.004514 0.964 0.982
## 0.835 1246 1 0.972 0.004577 0.963 0.981
## 0.841 1243 1 0.971 0.004640 0.962 0.981
## 0.849 1242 1 0.971 0.004702 0.961 0.980
## 0.862 1240 1 0.970 0.004763 0.961 0.979
## 0.873 1237 1 0.969 0.004823 0.960 0.979
## 0.876 1236 2 0.967 0.004941 0.958 0.977
## 0.884 1234 1 0.967 0.004999 0.957 0.977
## 0.887 1233 1 0.966 0.005056 0.956 0.976
## 0.890 1232 1 0.965 0.005112 0.955 0.975
## 0.893 1231 2 0.964 0.005223 0.953 0.974
## 0.895 1229 1 0.963 0.005277 0.952 0.973
## 0.909 1224 1 0.962 0.005331 0.952 0.972
## 0.917 1223 1 0.961 0.005384 0.951 0.972
## 0.920 1222 1 0.960 0.005437 0.950 0.971
## 0.923 1221 2 0.959 0.005541 0.948 0.970
## 0.925 1219 1 0.958 0.005592 0.947 0.969
## 0.945 1217 1 0.957 0.005642 0.946 0.968
## 0.950 1216 3 0.955 0.005791 0.944 0.966
## 0.953 1213 1 0.954 0.005839 0.943 0.966
## 0.977 1210 1 0.953 0.005887 0.942 0.965
## 0.980 1208 2 0.952 0.005982 0.940 0.964
## 0.983 1206 1 0.951 0.006029 0.939 0.963
## 0.986 1205 1 0.950 0.006076 0.938 0.962
## 0.991 1204 1 0.949 0.006122 0.937 0.961
## 0.994 1203 2 0.948 0.006212 0.936 0.960
## 0.999 1200 3 0.945 0.006346 0.933 0.958
## 1.002 1196 1 0.945 0.006389 0.932 0.957
## 1.008 1195 1 0.944 0.006433 0.931 0.957
## 1.013 1194 1 0.943 0.006476 0.930 0.956
## 1.016 1193 1 0.942 0.006518 0.930 0.955
## 1.021 1191 1 0.941 0.006561 0.929 0.954
## 1.029 1189 1 0.941 0.006603 0.928 0.954
## 1.038 1188 1 0.940 0.006645 0.927 0.953
## 1.040 1187 1 0.939 0.006686 0.926 0.952
## 1.043 1184 1 0.938 0.006727 0.925 0.952
## 1.049 1183 1 0.937 0.006768 0.924 0.951
## 1.051 1182 1 0.937 0.006809 0.923 0.950
## 1.054 1181 1 0.936 0.006849 0.923 0.949
## 1.060 1179 1 0.935 0.006889 0.922 0.949
## 1.062 1178 1 0.934 0.006929 0.921 0.948
## 1.081 1176 1 0.934 0.006968 0.920 0.947
## 1.090 1173 1 0.933 0.007008 0.919 0.947
## 1.092 1171 2 0.931 0.007086 0.917 0.945
## 1.095 1169 1 0.930 0.007124 0.916 0.944
## 1.101 1166 2 0.929 0.007201 0.915 0.943
## 1.103 1164 2 0.927 0.007276 0.913 0.942
## 1.106 1162 2 0.926 0.007351 0.911 0.940
## 1.112 1159 2 0.924 0.007424 0.910 0.939
## 1.114 1156 1 0.923 0.007461 0.909 0.938
## 1.120 1154 1 0.922 0.007497 0.908 0.937
## 1.123 1153 1 0.922 0.007533 0.907 0.936
## 1.125 1152 2 0.920 0.007605 0.905 0.935
## 1.128 1150 1 0.919 0.007640 0.904 0.934
## 1.131 1149 3 0.917 0.007745 0.902 0.932
## 1.133 1146 1 0.916 0.007779 0.901 0.931
## 1.139 1143 2 0.914 0.007848 0.899 0.930
## 1.153 1140 1 0.914 0.007882 0.898 0.929
## 1.164 1136 1 0.913 0.007916 0.897 0.928
## 1.166 1135 2 0.911 0.007983 0.896 0.927
## 1.177 1133 1 0.910 0.008016 0.895 0.926
## 1.183 1132 1 0.910 0.008049 0.894 0.925
## 1.188 1128 1 0.909 0.008083 0.893 0.925
## 1.194 1127 1 0.908 0.008116 0.892 0.924
## 1.199 1126 1 0.907 0.008148 0.891 0.923
## 1.202 1125 1 0.906 0.008181 0.890 0.922
## 1.205 1124 1 0.905 0.008213 0.890 0.922
## 1.207 1123 1 0.905 0.008245 0.889 0.921
## 1.213 1122 2 0.903 0.008309 0.887 0.920
## 1.221 1119 2 0.901 0.008372 0.885 0.918
## 1.224 1117 2 0.900 0.008435 0.883 0.917
## 1.232 1115 2 0.898 0.008496 0.882 0.915
## 1.240 1112 1 0.897 0.008527 0.881 0.914
## 1.248 1110 2 0.896 0.008588 0.879 0.913
## 1.251 1108 2 0.894 0.008648 0.877 0.911
## 1.257 1106 2 0.893 0.008708 0.876 0.910
## 1.265 1104 1 0.892 0.008738 0.875 0.909
## 1.273 1103 1 0.891 0.008767 0.874 0.908
## 1.276 1102 2 0.889 0.008825 0.872 0.907
## 1.279 1100 1 0.889 0.008854 0.871 0.906
## 1.281 1098 1 0.888 0.008883 0.870 0.905
## 1.290 1096 1 0.887 0.008912 0.870 0.905
## 1.295 1093 1 0.886 0.008941 0.869 0.904
## 1.303 1091 1 0.885 0.008969 0.868 0.903
## 1.306 1090 1 0.884 0.008998 0.867 0.902
## 1.309 1087 1 0.884 0.009026 0.866 0.902
## 1.322 1085 3 0.881 0.009111 0.864 0.899
## 1.325 1081 1 0.880 0.009139 0.863 0.899
## 1.328 1080 1 0.880 0.009166 0.862 0.898
## 1.331 1079 1 0.879 0.009194 0.861 0.897
## 1.333 1078 1 0.878 0.009222 0.860 0.896
## 1.339 1077 1 0.877 0.009249 0.859 0.895
## 1.344 1074 2 0.876 0.009304 0.857 0.894
## 1.347 1072 2 0.874 0.009358 0.856 0.892
## 1.352 1070 1 0.873 0.009385 0.855 0.892
## 1.355 1069 4 0.870 0.009491 0.851 0.889
## 1.358 1064 1 0.869 0.009517 0.851 0.888
## 1.366 1062 3 0.867 0.009595 0.848 0.886
## 1.369 1059 1 0.866 0.009621 0.847 0.885
## 1.372 1057 2 0.864 0.009672 0.845 0.883
## 1.374 1054 1 0.863 0.009697 0.844 0.882
## 1.377 1053 1 0.862 0.009723 0.844 0.882
## 1.385 1050 1 0.862 0.009748 0.843 0.881
## 1.396 1047 1 0.861 0.009773 0.842 0.880
## 1.399 1046 1 0.860 0.009799 0.841 0.879
## 1.405 1045 1 0.859 0.009824 0.840 0.879
## 1.410 1044 1 0.858 0.009849 0.839 0.878
## 1.421 1040 2 0.857 0.009899 0.837 0.876
## 1.424 1037 1 0.856 0.009924 0.837 0.876
## 1.426 1036 1 0.855 0.009948 0.836 0.875
## 1.432 1035 1 0.854 0.009973 0.835 0.874
## 1.435 1034 1 0.853 0.009998 0.834 0.873
## 1.440 1032 3 0.851 0.010071 0.831 0.871
## 1.446 1028 1 0.850 0.010095 0.830 0.870
## 1.448 1027 1 0.849 0.010119 0.830 0.869
## 1.459 1026 1 0.848 0.010143 0.829 0.869
## 1.462 1025 1 0.848 0.010167 0.828 0.868
## 1.465 1023 1 0.847 0.010190 0.827 0.867
## 1.473 1022 1 0.846 0.010214 0.826 0.866
## 1.481 1020 2 0.844 0.010261 0.824 0.865
## 1.489 1016 1 0.843 0.010285 0.824 0.864
## 1.492 1015 2 0.842 0.010331 0.822 0.862
## 1.495 1013 5 0.838 0.010446 0.817 0.858
## 1.511 1007 3 0.835 0.010514 0.815 0.856
## 1.517 1002 2 0.833 0.010559 0.813 0.854
## 1.536 998 2 0.832 0.010603 0.811 0.853
## 1.572 988 1 0.831 0.010626 0.810 0.852
## 1.574 987 1 0.830 0.010648 0.809 0.851
## 1.580 986 1 0.829 0.010671 0.809 0.850
## 1.582 985 2 0.828 0.010715 0.807 0.849
## 1.588 982 2 0.826 0.010760 0.805 0.847
## 1.593 979 1 0.825 0.010782 0.804 0.846
## 1.602 978 1 0.824 0.010804 0.803 0.846
## 1.607 976 1 0.823 0.010826 0.802 0.845
## 1.613 974 1 0.823 0.010847 0.802 0.844
## 1.618 973 1 0.822 0.010869 0.801 0.843
## 1.624 971 1 0.821 0.010891 0.800 0.842
## 1.629 969 1 0.820 0.010912 0.799 0.842
## 1.632 968 2 0.818 0.010955 0.797 0.840
## 1.637 966 1 0.817 0.010977 0.796 0.839
## 1.640 965 2 0.816 0.011019 0.794 0.838
## 1.662 962 1 0.815 0.011040 0.794 0.837
## 1.665 959 1 0.814 0.011061 0.793 0.836
## 1.667 957 1 0.813 0.011083 0.792 0.835
## 1.673 956 1 0.812 0.011104 0.791 0.834
## 1.678 955 1 0.811 0.011125 0.790 0.834
## 1.684 953 2 0.810 0.011166 0.788 0.832
## 1.697 949 2 0.808 0.011208 0.786 0.830
## 1.700 947 1 0.807 0.011228 0.786 0.830
## 1.722 943 1 0.806 0.011249 0.785 0.829
## 1.725 942 2 0.805 0.011290 0.783 0.827
## 1.739 938 1 0.804 0.011310 0.782 0.826
## 1.747 937 2 0.802 0.011351 0.780 0.825
## 1.758 933 2 0.800 0.011392 0.778 0.823
## 1.763 931 1 0.799 0.011412 0.777 0.822
## 1.766 928 1 0.799 0.011432 0.777 0.821
## 1.777 926 1 0.798 0.011452 0.776 0.821
## 1.780 925 1 0.797 0.011472 0.775 0.820
## 1.793 922 1 0.796 0.011492 0.774 0.819
## 1.796 920 1 0.795 0.011512 0.773 0.818
## 1.807 917 1 0.794 0.011532 0.772 0.817
## 1.821 915 1 0.793 0.011553 0.771 0.816
## 1.826 912 1 0.793 0.011573 0.770 0.816
## 1.829 911 1 0.792 0.011593 0.769 0.815
## 1.832 910 1 0.791 0.011612 0.768 0.814
## 1.834 909 1 0.790 0.011632 0.767 0.813
## 1.837 907 1 0.789 0.011652 0.767 0.812
## 1.843 905 1 0.788 0.011672 0.766 0.811
## 1.856 903 1 0.787 0.011691 0.765 0.811
## 1.864 901 1 0.786 0.011711 0.764 0.810
## 1.870 900 1 0.786 0.011730 0.763 0.809
## 1.878 899 1 0.785 0.011750 0.762 0.808
## 1.892 898 1 0.784 0.011769 0.761 0.807
## 1.911 894 1 0.783 0.011789 0.760 0.806
## 1.922 893 1 0.782 0.011808 0.759 0.806
## 1.925 892 1 0.781 0.011827 0.758 0.805
## 1.927 891 1 0.780 0.011847 0.757 0.804
## 1.933 889 1 0.779 0.011866 0.757 0.803
## 1.936 888 1 0.779 0.011885 0.756 0.802
## 1.941 886 2 0.777 0.011923 0.754 0.801
## 1.952 879 1 0.776 0.011942 0.753 0.800
## 1.979 875 1 0.775 0.011961 0.752 0.799
## 1.982 874 2 0.773 0.011999 0.750 0.797
## 1.999 871 1 0.772 0.012018 0.749 0.796
## 2.004 870 1 0.772 0.012037 0.748 0.795
## 2.012 869 2 0.770 0.012075 0.746 0.794
## 2.018 867 2 0.768 0.012112 0.745 0.792
## 2.021 865 1 0.767 0.012131 0.744 0.791
## 2.053 861 1 0.766 0.012149 0.743 0.790
## 2.059 859 1 0.765 0.012168 0.742 0.790
## 2.062 858 2 0.764 0.012205 0.740 0.788
## 2.081 855 1 0.763 0.012223 0.739 0.787
## 2.086 854 1 0.762 0.012241 0.738 0.786
## 2.089 853 1 0.761 0.012259 0.737 0.785
## 2.094 852 1 0.760 0.012277 0.736 0.784
## 2.100 848 1 0.759 0.012296 0.735 0.784
## 2.105 845 1 0.758 0.012314 0.734 0.783
## 2.114 843 1 0.757 0.012332 0.733 0.782
## 2.122 842 3 0.755 0.012386 0.731 0.779
## 2.130 839 1 0.754 0.012404 0.730 0.778
## 2.138 838 1 0.753 0.012422 0.729 0.777
## 2.144 837 1 0.752 0.012439 0.728 0.777
## 2.146 836 1 0.751 0.012457 0.727 0.776
## 2.152 835 1 0.750 0.012474 0.726 0.775
## 2.182 830 1 0.749 0.012492 0.725 0.774
## 2.185 829 2 0.747 0.012527 0.723 0.772
## 2.196 826 1 0.746 0.012545 0.722 0.771
## 2.207 824 2 0.745 0.012579 0.720 0.770
## 2.218 819 1 0.744 0.012597 0.719 0.769
## 2.220 818 2 0.742 0.012632 0.718 0.767
## 2.229 812 1 0.741 0.012649 0.717 0.766
## 2.248 808 1 0.740 0.012667 0.716 0.765
## 2.251 807 1 0.739 0.012684 0.715 0.764
## 2.261 806 1 0.738 0.012701 0.714 0.764
## 2.270 804 1 0.737 0.012719 0.713 0.763
## 2.275 803 1 0.736 0.012736 0.712 0.762
## 2.305 795 1 0.735 0.012754 0.711 0.761
## 2.311 794 1 0.735 0.012771 0.710 0.760
## 2.327 791 1 0.734 0.012789 0.709 0.759
## 2.349 788 1 0.733 0.012806 0.708 0.758
## 2.352 787 1 0.732 0.012824 0.707 0.757
## 2.366 786 1 0.731 0.012841 0.706 0.756
## 2.376 784 1 0.730 0.012859 0.705 0.756
## 2.379 783 1 0.729 0.012876 0.704 0.755
## 2.390 780 3 0.726 0.012928 0.701 0.752
## 2.396 777 1 0.725 0.012945 0.700 0.751
## 2.412 774 1 0.724 0.012962 0.699 0.750
## 2.418 773 1 0.723 0.012979 0.698 0.749
## 2.434 769 1 0.722 0.012996 0.697 0.748
## 2.453 767 2 0.721 0.013030 0.695 0.747
## 2.464 765 1 0.720 0.013047 0.694 0.746
## 2.467 763 1 0.719 0.013064 0.693 0.745
## 2.478 759 1 0.718 0.013081 0.692 0.744
## 2.480 758 1 0.717 0.013098 0.692 0.743
## 2.497 753 2 0.715 0.013133 0.690 0.741
## 2.502 751 1 0.714 0.013150 0.689 0.740
## 2.505 750 1 0.713 0.013166 0.688 0.739
## 2.508 749 2 0.711 0.013200 0.686 0.737
## 2.516 745 1 0.710 0.013217 0.685 0.736
## 2.519 744 1 0.709 0.013233 0.684 0.736
## 2.530 741 1 0.708 0.013250 0.683 0.735
## 2.533 740 2 0.706 0.013283 0.681 0.733
## 2.549 738 1 0.705 0.013300 0.680 0.732
## 2.552 737 1 0.704 0.013316 0.679 0.731
## 2.557 735 1 0.703 0.013332 0.678 0.730
## 2.568 733 2 0.701 0.013365 0.676 0.728
## 2.576 727 2 0.700 0.013397 0.674 0.726
## 2.579 724 1 0.699 0.013414 0.673 0.725
## 2.582 722 1 0.698 0.013430 0.672 0.724
## 2.585 721 1 0.697 0.013446 0.671 0.723
## 2.601 718 2 0.695 0.013478 0.669 0.722
## 2.604 715 1 0.694 0.013495 0.668 0.721
## 2.615 711 1 0.693 0.013511 0.667 0.720
## 2.623 710 2 0.691 0.013543 0.665 0.718
## 2.628 707 1 0.690 0.013559 0.664 0.717
## 2.637 706 1 0.689 0.013575 0.663 0.716
## 2.642 705 1 0.688 0.013591 0.662 0.715
## 2.656 703 1 0.687 0.013607 0.661 0.714
## 2.661 701 1 0.686 0.013623 0.660 0.713
## 2.667 700 2 0.684 0.013654 0.658 0.711
## 2.675 697 1 0.683 0.013670 0.657 0.710
## 2.691 694 2 0.681 0.013701 0.655 0.708
## 2.721 690 1 0.680 0.013717 0.654 0.707
## 2.732 688 1 0.679 0.013732 0.653 0.706
## 2.738 686 1 0.678 0.013748 0.652 0.706
## 2.741 685 1 0.677 0.013763 0.651 0.705
## 2.746 683 1 0.676 0.013779 0.650 0.704
## 2.749 681 1 0.675 0.013794 0.649 0.703
## 2.754 679 1 0.674 0.013810 0.648 0.702
## 2.768 678 1 0.673 0.013825 0.646 0.701
## 2.790 673 1 0.672 0.013841 0.645 0.700
## 2.793 672 1 0.671 0.013856 0.644 0.699
## 2.795 671 1 0.670 0.013872 0.643 0.698
## 2.798 670 1 0.669 0.013887 0.642 0.697
## 2.809 667 1 0.668 0.013902 0.641 0.696
## 2.812 666 1 0.667 0.013917 0.640 0.695
## 2.834 663 1 0.666 0.013933 0.639 0.694
## 2.847 661 2 0.664 0.013963 0.637 0.692
## 2.850 659 1 0.663 0.013978 0.636 0.691
## 2.856 656 1 0.662 0.013994 0.635 0.690
## 2.869 655 1 0.661 0.014009 0.634 0.689
## 2.875 653 2 0.659 0.014039 0.632 0.687
## 2.891 651 1 0.658 0.014054 0.631 0.686
## 2.894 650 1 0.657 0.014068 0.630 0.685
## 2.913 647 1 0.656 0.014083 0.629 0.684
## 2.919 646 1 0.655 0.014098 0.628 0.683
## 2.932 644 1 0.654 0.014113 0.627 0.682
## 2.946 642 1 0.653 0.014128 0.626 0.681
## 2.949 640 1 0.652 0.014142 0.625 0.680
## 2.954 637 2 0.650 0.014172 0.623 0.678
## 2.973 632 1 0.649 0.014186 0.622 0.677
## 2.979 631 2 0.647 0.014216 0.619 0.675
## 2.982 629 1 0.646 0.014230 0.618 0.674
## 2.984 628 1 0.645 0.014245 0.617 0.673
## 2.992 625 1 0.644 0.014259 0.616 0.672
## 2.995 624 1 0.643 0.014274 0.615 0.671
## 3.003 623 1 0.642 0.014288 0.614 0.670
## 3.025 619 2 0.640 0.014317 0.612 0.668
## 3.047 610 1 0.638 0.014332 0.611 0.667
## 3.058 606 1 0.637 0.014347 0.610 0.666
## 3.069 604 1 0.636 0.014362 0.609 0.665
## 3.072 603 2 0.634 0.014391 0.607 0.663
## 3.075 601 1 0.633 0.014406 0.606 0.662
## 3.086 597 1 0.632 0.014421 0.604 0.661
## 3.097 595 2 0.630 0.014451 0.602 0.659
## 3.099 593 1 0.629 0.014465 0.601 0.658
## 3.107 592 2 0.627 0.014494 0.599 0.656
## 3.118 589 1 0.626 0.014509 0.598 0.655
## 3.124 588 1 0.625 0.014523 0.597 0.654
## 3.132 587 1 0.624 0.014537 0.596 0.653
## 3.143 584 2 0.621 0.014566 0.594 0.651
## 3.149 581 1 0.620 0.014580 0.592 0.650
## 3.154 580 1 0.619 0.014594 0.591 0.649
## 3.162 578 2 0.617 0.014622 0.589 0.647
## 3.168 576 1 0.616 0.014636 0.588 0.645
## 3.181 573 1 0.615 0.014649 0.587 0.644
## 3.190 571 2 0.613 0.014677 0.585 0.642
## 3.198 569 1 0.612 0.014691 0.584 0.641
## 3.217 567 1 0.611 0.014704 0.583 0.640
## 3.225 566 1 0.610 0.014718 0.581 0.639
## 3.231 563 1 0.609 0.014732 0.580 0.638
## 3.253 561 2 0.606 0.014759 0.578 0.636
## 3.272 557 2 0.604 0.014786 0.576 0.634
## 3.274 555 1 0.603 0.014799 0.575 0.633
## 3.277 554 1 0.602 0.014813 0.574 0.632
## 3.280 553 1 0.601 0.014826 0.573 0.631
## 3.283 551 1 0.600 0.014839 0.571 0.630
## 3.310 547 2 0.598 0.014865 0.569 0.628
## 3.316 543 1 0.597 0.014879 0.568 0.626
## 3.335 542 1 0.595 0.014892 0.567 0.625
## 3.337 540 1 0.594 0.014905 0.566 0.624
## 3.346 539 1 0.593 0.014918 0.565 0.623
## 3.373 530 2 0.591 0.014946 0.562 0.621
## 3.384 525 1 0.590 0.014960 0.561 0.620
## 3.389 523 1 0.589 0.014973 0.560 0.619
## 3.395 521 1 0.588 0.014987 0.559 0.618
## 3.403 519 1 0.587 0.015001 0.558 0.617
## 3.409 516 1 0.585 0.015015 0.557 0.616
## 3.411 515 2 0.583 0.015043 0.554 0.613
## 3.428 513 1 0.582 0.015056 0.553 0.612
## 3.431 512 1 0.581 0.015070 0.552 0.611
## 3.450 507 2 0.579 0.015097 0.550 0.609
## 3.452 504 1 0.577 0.015111 0.549 0.608
## 3.458 501 2 0.575 0.015138 0.546 0.606
## 3.469 497 2 0.573 0.015165 0.544 0.603
## 3.483 494 1 0.572 0.015179 0.543 0.602
## 3.491 492 1 0.570 0.015192 0.541 0.601
## 3.504 488 1 0.569 0.015206 0.540 0.600
## 3.518 486 1 0.568 0.015220 0.539 0.599
## 3.521 485 1 0.567 0.015233 0.538 0.598
## 3.526 484 1 0.566 0.015247 0.537 0.596
## 3.532 482 3 0.562 0.015287 0.533 0.593
## 3.537 479 1 0.561 0.015300 0.532 0.592
## 3.543 478 2 0.559 0.015326 0.529 0.590
## 3.556 473 2 0.556 0.015352 0.527 0.587
## 3.562 470 1 0.555 0.015365 0.526 0.586
## 3.567 467 1 0.554 0.015378 0.525 0.585
## 3.576 466 1 0.553 0.015391 0.523 0.584
## 3.578 464 1 0.552 0.015404 0.522 0.583
## 3.592 462 1 0.550 0.015416 0.521 0.581
## 3.600 460 1 0.549 0.015429 0.520 0.580
## 3.603 458 1 0.548 0.015442 0.519 0.579
## 3.606 457 1 0.547 0.015455 0.517 0.578
## 3.608 453 1 0.546 0.015468 0.516 0.577
## 3.617 449 1 0.544 0.015481 0.515 0.576
## 3.625 446 1 0.543 0.015494 0.514 0.574
## 3.630 443 1 0.542 0.015508 0.512 0.573
## 3.636 442 3 0.538 0.015547 0.509 0.570
## 3.639 439 1 0.537 0.015560 0.507 0.568
## 3.677 434 2 0.535 0.015587 0.505 0.566
## 3.682 431 1 0.533 0.015600 0.504 0.565
## 3.688 427 1 0.532 0.015613 0.502 0.564
## 3.691 425 1 0.531 0.015626 0.501 0.562
## 3.713 423 1 0.530 0.015640 0.500 0.561
## 3.729 420 1 0.528 0.015653 0.499 0.560
## 3.737 419 1 0.527 0.015667 0.497 0.559
## 3.748 417 1 0.526 0.015680 0.496 0.557
## 3.754 415 1 0.525 0.015693 0.495 0.556
## 3.756 413 1 0.523 0.015707 0.493 0.555
## 3.759 411 1 0.522 0.015720 0.492 0.554
## 3.762 409 2 0.519 0.015746 0.489 0.551
## 3.765 407 1 0.518 0.015759 0.488 0.550
## 3.767 406 1 0.517 0.015772 0.487 0.549
## 3.784 403 1 0.516 0.015785 0.486 0.547
## 3.808 398 1 0.514 0.015798 0.484 0.546
## 3.814 397 1 0.513 0.015812 0.483 0.545
## 3.822 396 2 0.510 0.015838 0.480 0.542
## 3.825 394 1 0.509 0.015850 0.479 0.541
## 3.828 392 2 0.507 0.015875 0.476 0.539
## 3.830 390 1 0.505 0.015888 0.475 0.537
## 3.833 389 1 0.504 0.015900 0.474 0.536
## 3.836 388 2 0.501 0.015924 0.471 0.534
## 3.852 383 1 0.500 0.015936 0.470 0.532
## 3.858 382 1 0.499 0.015948 0.468 0.531
## 3.869 380 1 0.497 0.015960 0.467 0.530
## 3.871 377 1 0.496 0.015972 0.466 0.528
## 3.882 376 3 0.492 0.016007 0.462 0.525
## 3.890 371 1 0.491 0.016019 0.460 0.523
## 3.893 370 1 0.489 0.016030 0.459 0.522
## 3.896 367 1 0.488 0.016042 0.458 0.521
## 3.918 362 1 0.487 0.016054 0.456 0.519
## 3.929 360 1 0.485 0.016067 0.455 0.518
## 3.937 359 1 0.484 0.016079 0.454 0.517
## 3.940 358 1 0.483 0.016090 0.452 0.515
## 3.943 357 1 0.481 0.016102 0.451 0.514
## 3.945 356 1 0.480 0.016114 0.449 0.513
## 3.953 355 1 0.479 0.016125 0.448 0.511
## 3.967 353 1 0.477 0.016136 0.447 0.510
## 3.970 352 1 0.476 0.016147 0.445 0.509
## 3.978 350 1 0.475 0.016158 0.444 0.507
## 3.981 349 2 0.472 0.016180 0.441 0.505
## 3.995 346 1 0.471 0.016190 0.440 0.503
## 4.005 343 1 0.469 0.016201 0.438 0.502
## 4.008 342 1 0.468 0.016212 0.437 0.501
## 4.030 336 1 0.466 0.016223 0.436 0.499
## 4.033 335 2 0.464 0.016245 0.433 0.497
## 4.036 333 1 0.462 0.016256 0.431 0.495
## 4.038 332 1 0.461 0.016266 0.430 0.494
## 4.044 331 1 0.459 0.016277 0.429 0.492
## 4.052 327 1 0.458 0.016288 0.427 0.491
## 4.066 323 2 0.455 0.016310 0.424 0.488
## 4.071 321 1 0.454 0.016320 0.423 0.487
## 4.074 318 1 0.452 0.016331 0.421 0.486
## 4.079 317 1 0.451 0.016342 0.420 0.484
## 4.090 315 1 0.449 0.016353 0.419 0.483
## 4.099 314 3 0.445 0.016383 0.414 0.478
## 4.104 311 2 0.442 0.016403 0.411 0.476
## 4.107 309 1 0.441 0.016412 0.410 0.474
## 4.140 305 1 0.439 0.016422 0.408 0.473
## 4.148 304 1 0.438 0.016431 0.407 0.471
## 4.153 301 1 0.437 0.016441 0.405 0.470
## 4.159 299 1 0.435 0.016451 0.404 0.469
## 4.164 296 1 0.434 0.016460 0.403 0.467
## 4.167 295 1 0.432 0.016470 0.401 0.466
## 4.175 294 2 0.429 0.016489 0.398 0.463
## 4.186 291 3 0.425 0.016516 0.394 0.458
## 4.192 287 2 0.422 0.016533 0.391 0.456
## 4.194 284 1 0.420 0.016541 0.389 0.454
## 4.197 283 2 0.417 0.016557 0.386 0.451
## 4.200 281 1 0.416 0.016564 0.385 0.450
## 4.205 280 1 0.414 0.016572 0.383 0.448
## 4.211 279 2 0.411 0.016585 0.380 0.445
## 4.216 277 2 0.408 0.016598 0.377 0.442
## 4.225 275 1 0.407 0.016604 0.376 0.441
## 4.233 274 1 0.405 0.016610 0.374 0.439
## 4.241 273 1 0.404 0.016615 0.373 0.438
## 4.257 270 1 0.403 0.016621 0.371 0.436
## 4.260 269 2 0.400 0.016632 0.368 0.433
## 4.263 266 1 0.398 0.016637 0.367 0.432
## 4.266 265 1 0.397 0.016642 0.365 0.431
## 4.268 264 1 0.395 0.016646 0.364 0.429
## 4.279 262 1 0.393 0.016651 0.362 0.428
## 4.290 260 1 0.392 0.016655 0.361 0.426
## 4.298 259 1 0.390 0.016660 0.359 0.425
## 4.318 252 1 0.389 0.016666 0.358 0.423
## 4.326 250 2 0.386 0.016677 0.354 0.420
## 4.331 247 1 0.384 0.016682 0.353 0.418
## 4.334 246 1 0.383 0.016687 0.351 0.417
## 4.356 244 1 0.381 0.016693 0.350 0.415
## 4.359 243 1 0.380 0.016697 0.348 0.414
## 4.364 242 1 0.378 0.016702 0.347 0.412
## 4.370 241 1 0.376 0.016706 0.345 0.411
## 4.381 236 1 0.375 0.016711 0.343 0.409
## 4.405 231 1 0.373 0.016717 0.342 0.407
## 4.422 228 2 0.370 0.016730 0.339 0.404
## 4.424 226 1 0.368 0.016736 0.337 0.403
## 4.438 224 1 0.367 0.016742 0.335 0.401
## 4.441 222 1 0.365 0.016748 0.334 0.399
## 4.444 220 2 0.362 0.016759 0.330 0.396
## 4.457 217 1 0.360 0.016765 0.329 0.394
## 4.465 215 4 0.353 0.016784 0.322 0.388
## 4.479 209 2 0.350 0.016793 0.319 0.384
## 4.496 204 1 0.348 0.016798 0.317 0.383
## 4.498 203 2 0.345 0.016806 0.313 0.379
## 4.504 201 1 0.343 0.016810 0.312 0.378
## 4.507 200 1 0.341 0.016813 0.310 0.376
## 4.517 198 1 0.340 0.016817 0.308 0.374
## 4.528 197 1 0.338 0.016819 0.306 0.373
## 4.537 196 1 0.336 0.016822 0.305 0.371
## 4.542 195 1 0.334 0.016824 0.303 0.369
## 4.545 193 2 0.331 0.016827 0.300 0.366
## 4.553 191 1 0.329 0.016828 0.298 0.364
## 4.567 189 2 0.326 0.016829 0.294 0.360
## 4.569 187 4 0.319 0.016826 0.287 0.354
## 4.572 182 1 0.317 0.016824 0.286 0.352
## 4.575 180 1 0.315 0.016823 0.284 0.350
## 4.591 177 1 0.314 0.016822 0.282 0.348
## 4.594 175 1 0.312 0.016821 0.280 0.346
## 4.600 173 2 0.308 0.016818 0.277 0.343
## 4.602 171 1 0.306 0.016816 0.275 0.341
## 4.616 167 1 0.304 0.016815 0.273 0.339
## 4.621 166 2 0.301 0.016811 0.270 0.336
## 4.624 164 1 0.299 0.016809 0.268 0.334
## 4.627 163 1 0.297 0.016805 0.266 0.332
## 4.630 162 1 0.295 0.016801 0.264 0.330
## 4.649 161 1 0.293 0.016797 0.262 0.328
## 4.654 159 1 0.292 0.016792 0.261 0.326
## 4.660 157 1 0.290 0.016788 0.259 0.325
## 4.668 156 1 0.288 0.016783 0.257 0.323
## 4.674 154 1 0.286 0.016777 0.255 0.321
## 4.679 153 1 0.284 0.016772 0.253 0.319
## 4.693 152 1 0.282 0.016765 0.251 0.317
## 4.704 150 1 0.280 0.016759 0.249 0.315
## 4.717 149 2 0.277 0.016744 0.246 0.311
## 4.726 147 1 0.275 0.016735 0.244 0.310
## 4.742 144 1 0.273 0.016727 0.242 0.308
## 4.745 143 1 0.271 0.016719 0.240 0.306
## 4.750 139 1 0.269 0.016712 0.238 0.304
## 4.753 138 2 0.265 0.016696 0.234 0.300
## 4.756 136 1 0.263 0.016686 0.232 0.298
## 4.767 134 1 0.261 0.016677 0.230 0.296
## 4.769 133 1 0.259 0.016667 0.229 0.294
## 4.775 131 1 0.257 0.016657 0.227 0.292
## 4.789 126 1 0.255 0.016649 0.225 0.290
## 4.791 124 1 0.253 0.016641 0.223 0.288
## 4.794 123 1 0.251 0.016633 0.221 0.286
## 4.797 122 1 0.249 0.016623 0.218 0.284
## 4.802 121 2 0.245 0.016602 0.214 0.280
## 4.816 117 1 0.243 0.016591 0.212 0.278
## 4.819 116 1 0.241 0.016580 0.210 0.276
## 4.824 115 1 0.239 0.016567 0.208 0.273
## 4.838 111 1 0.236 0.016557 0.206 0.271
## 4.854 107 1 0.234 0.016549 0.204 0.269
## 4.893 99 1 0.232 0.016550 0.202 0.267
## 4.895 97 1 0.230 0.016551 0.199 0.264
## 4.901 96 2 0.225 0.016548 0.195 0.260
## 4.942 89 1 0.222 0.016554 0.192 0.257
ggsurvplot(fit, data = colon, risk.table = TRUE, conf.int = TRUE, conf.int.fill = "black", conf.int.style = "step", surv.median.line = "h", censor.size=2.5, risk.table.fontsize = 3.5, censor.shape=".", xlab="Time (years)")
Nel grafico è riportata la sopravvivenza nei primi 5 anni calcolata con lo stimatore di Kaplan-Meier.
La sopravvivenza mediana, come si osserva nel grafico, è poco inferiore a 4 anni.
Si stima la sopravvivenza di Kaplan-Meier per stadio, che viene rappresentata graficamente.
fit<-survfit(Surv(survtime, as.numeric(dead)) ~ Stadio,data=colon)
summary(fit)
## Call: survfit(formula = Surv(survtime, as.numeric(dead)) ~ Stadio,
## data = colon)
##
## Stadio=Stadio I
## time n.risk n.event survival std.err lower 95% CI upper 95% CI
## 0.586 228 1 0.996 0.00438 0.987 1.000
## 0.641 225 1 0.991 0.00620 0.979 1.000
## 0.660 224 1 0.987 0.00759 0.972 1.000
## 0.709 220 1 0.982 0.00878 0.965 1.000
## 0.731 219 1 0.978 0.00982 0.959 0.997
## 0.783 218 1 0.973 0.01075 0.952 0.995
## 0.816 216 1 0.969 0.01161 0.946 0.992
## 0.884 213 1 0.964 0.01241 0.940 0.989
## 0.917 212 1 0.960 0.01316 0.934 0.986
## 0.923 211 1 0.955 0.01386 0.928 0.983
## 0.925 210 1 0.951 0.01452 0.923 0.980
## 0.945 208 1 0.946 0.01516 0.917 0.976
## 0.986 207 1 0.941 0.01576 0.911 0.973
## 1.029 205 1 0.937 0.01633 0.905 0.969
## 1.106 203 1 0.932 0.01689 0.900 0.966
## 1.177 202 1 0.928 0.01743 0.894 0.962
## 1.205 200 1 0.923 0.01795 0.888 0.959
## 1.221 198 1 0.918 0.01845 0.883 0.955
## 1.257 196 1 0.914 0.01894 0.877 0.952
## 1.322 192 1 0.909 0.01943 0.872 0.948
## 1.331 190 1 0.904 0.01991 0.866 0.944
## 1.432 185 1 0.899 0.02040 0.860 0.940
## 1.492 184 1 0.894 0.02086 0.854 0.936
## 1.495 183 1 0.889 0.02131 0.849 0.932
## 1.517 182 1 0.885 0.02175 0.843 0.928
## 1.588 177 1 0.880 0.02219 0.837 0.924
## 1.613 174 1 0.875 0.02263 0.831 0.920
## 1.632 173 1 0.869 0.02306 0.825 0.916
## 1.637 172 1 0.864 0.02347 0.820 0.912
## 1.640 171 2 0.854 0.02426 0.808 0.903
## 1.678 167 1 0.849 0.02465 0.802 0.899
## 1.697 165 2 0.839 0.02540 0.791 0.890
## 1.758 161 1 0.834 0.02578 0.785 0.886
## 1.763 160 1 0.828 0.02614 0.779 0.881
## 1.832 157 1 0.823 0.02650 0.773 0.877
## 1.843 156 1 0.818 0.02685 0.767 0.872
## 1.925 154 1 0.813 0.02719 0.761 0.868
## 1.941 153 1 0.807 0.02753 0.755 0.863
## 1.982 149 1 0.802 0.02787 0.749 0.858
## 2.053 147 1 0.796 0.02821 0.743 0.854
## 2.114 143 1 0.791 0.02856 0.737 0.849
## 2.207 141 1 0.785 0.02890 0.731 0.844
## 2.220 139 1 0.780 0.02924 0.724 0.839
## 2.366 134 1 0.774 0.02960 0.718 0.834
## 2.464 129 1 0.768 0.02997 0.711 0.829
## 2.497 127 1 0.762 0.03034 0.705 0.824
## 2.502 126 1 0.756 0.03069 0.698 0.818
## 2.568 124 1 0.750 0.03104 0.691 0.813
## 2.601 122 1 0.743 0.03139 0.684 0.808
## 2.604 121 1 0.737 0.03173 0.678 0.802
## 2.721 118 1 0.731 0.03207 0.671 0.797
## 2.746 115 1 0.725 0.03241 0.664 0.791
## 2.812 113 1 0.718 0.03275 0.657 0.785
## 2.850 111 1 0.712 0.03309 0.650 0.780
## 2.913 109 1 0.705 0.03343 0.643 0.774
## 2.954 107 1 0.699 0.03376 0.636 0.768
## 3.025 104 1 0.692 0.03409 0.628 0.762
## 3.118 98 1 0.685 0.03447 0.621 0.756
## 3.198 95 1 0.678 0.03485 0.613 0.750
## 3.272 94 1 0.670 0.03522 0.605 0.743
## 3.316 92 1 0.663 0.03558 0.597 0.737
## 3.373 90 1 0.656 0.03594 0.589 0.730
## 3.411 86 1 0.648 0.03633 0.581 0.723
## 3.450 85 1 0.641 0.03669 0.573 0.717
## 3.458 84 1 0.633 0.03704 0.564 0.710
## 3.469 82 1 0.625 0.03738 0.556 0.703
## 3.556 80 1 0.617 0.03772 0.548 0.696
## 3.677 72 1 0.609 0.03816 0.538 0.688
## 3.767 71 1 0.600 0.03857 0.529 0.681
## 3.852 68 1 0.591 0.03900 0.520 0.673
## 3.929 66 1 0.582 0.03943 0.510 0.665
## 4.104 61 1 0.573 0.03992 0.500 0.657
## 4.140 59 1 0.563 0.04041 0.489 0.648
## 4.153 58 1 0.554 0.04086 0.479 0.640
## 4.186 56 1 0.544 0.04131 0.468 0.631
## 4.197 53 1 0.533 0.04179 0.457 0.622
## 4.211 52 1 0.523 0.04222 0.447 0.613
## 4.318 48 1 0.512 0.04273 0.435 0.603
## 4.326 47 1 0.501 0.04318 0.423 0.594
## 4.465 43 2 0.478 0.04421 0.399 0.573
## 4.569 39 1 0.466 0.04474 0.386 0.562
## 4.621 36 1 0.453 0.04533 0.372 0.551
## 4.726 35 1 0.440 0.04585 0.359 0.540
## 4.745 34 1 0.427 0.04629 0.345 0.528
## 4.750 32 1 0.414 0.04672 0.331 0.516
## 4.756 31 1 0.400 0.04708 0.318 0.504
## 4.769 30 1 0.387 0.04737 0.304 0.492
## 4.819 28 1 0.373 0.04765 0.290 0.479
## 4.895 25 1 0.358 0.04802 0.275 0.466
##
## Stadio=Stadio II
## time n.risk n.event survival std.err lower 95% CI upper 95% CI
## 0.589 728 1 0.999 0.00137 0.996 1.000
## 0.591 727 1 0.997 0.00194 0.993 1.000
## 0.608 726 1 0.996 0.00237 0.991 1.000
## 0.613 725 1 0.995 0.00274 0.989 1.000
## 0.646 723 1 0.993 0.00306 0.987 0.999
## 0.649 722 1 0.992 0.00335 0.985 0.998
## 0.687 718 2 0.989 0.00387 0.981 0.997
## 0.715 716 1 0.988 0.00410 0.980 0.996
## 0.739 714 1 0.986 0.00433 0.978 0.995
## 0.769 711 1 0.985 0.00454 0.976 0.994
## 0.808 705 1 0.983 0.00474 0.974 0.993
## 0.832 704 1 0.982 0.00493 0.972 0.992
## 0.841 702 1 0.981 0.00512 0.971 0.991
## 0.849 701 1 0.979 0.00530 0.969 0.990
## 0.862 699 1 0.978 0.00548 0.967 0.989
## 0.873 698 1 0.976 0.00565 0.965 0.988
## 0.876 697 1 0.975 0.00581 0.964 0.986
## 0.887 696 1 0.974 0.00597 0.962 0.985
## 0.893 695 2 0.971 0.00627 0.959 0.983
## 0.909 690 1 0.969 0.00642 0.957 0.982
## 0.923 689 1 0.968 0.00656 0.955 0.981
## 0.950 688 2 0.965 0.00684 0.952 0.979
## 0.980 684 2 0.962 0.00710 0.949 0.976
## 0.983 682 1 0.961 0.00723 0.947 0.975
## 0.991 681 1 0.960 0.00736 0.945 0.974
## 0.994 680 1 0.958 0.00748 0.944 0.973
## 0.999 678 3 0.954 0.00784 0.939 0.969
## 1.008 675 1 0.953 0.00795 0.937 0.968
## 1.013 674 1 0.951 0.00806 0.935 0.967
## 1.038 671 1 0.950 0.00818 0.934 0.966
## 1.049 668 1 0.948 0.00829 0.932 0.965
## 1.051 667 1 0.947 0.00839 0.931 0.963
## 1.060 666 1 0.945 0.00850 0.929 0.962
## 1.081 664 1 0.944 0.00861 0.927 0.961
## 1.090 661 1 0.943 0.00871 0.926 0.960
## 1.092 659 2 0.940 0.00892 0.922 0.957
## 1.095 657 1 0.938 0.00902 0.921 0.956
## 1.103 655 1 0.937 0.00912 0.919 0.955
## 1.112 653 1 0.935 0.00921 0.918 0.954
## 1.114 652 1 0.934 0.00931 0.916 0.952
## 1.123 650 1 0.933 0.00941 0.914 0.951
## 1.128 649 1 0.931 0.00950 0.913 0.950
## 1.131 648 3 0.927 0.00978 0.908 0.946
## 1.133 645 1 0.925 0.00987 0.906 0.945
## 1.153 641 1 0.924 0.00996 0.905 0.944
## 1.164 638 1 0.922 0.01005 0.903 0.942
## 1.183 637 1 0.921 0.01014 0.901 0.941
## 1.194 634 1 0.920 0.01022 0.900 0.940
## 1.199 633 1 0.918 0.01031 0.898 0.939
## 1.207 632 1 0.917 0.01039 0.896 0.937
## 1.213 631 1 0.915 0.01048 0.895 0.936
## 1.221 630 1 0.914 0.01056 0.893 0.935
## 1.224 629 2 0.911 0.01073 0.890 0.932
## 1.240 627 1 0.909 0.01081 0.888 0.931
## 1.251 625 2 0.906 0.01097 0.885 0.928
## 1.257 623 1 0.905 0.01105 0.884 0.927
## 1.276 622 2 0.902 0.01120 0.880 0.924
## 1.290 619 1 0.901 0.01128 0.879 0.923
## 1.295 617 1 0.899 0.01135 0.877 0.922
## 1.303 615 1 0.898 0.01143 0.876 0.920
## 1.306 614 1 0.896 0.01150 0.874 0.919
## 1.325 612 1 0.895 0.01158 0.872 0.918
## 1.328 611 1 0.893 0.01165 0.871 0.916
## 1.344 608 1 0.892 0.01172 0.869 0.915
## 1.347 607 1 0.890 0.01180 0.868 0.914
## 1.355 606 3 0.886 0.01201 0.863 0.910
## 1.358 602 1 0.885 0.01208 0.861 0.909
## 1.366 600 3 0.880 0.01229 0.856 0.905
## 1.369 597 1 0.879 0.01235 0.855 0.903
## 1.372 595 2 0.876 0.01249 0.852 0.900
## 1.374 593 1 0.874 0.01255 0.850 0.899
## 1.377 592 1 0.873 0.01262 0.848 0.898
## 1.385 591 1 0.871 0.01268 0.847 0.896
## 1.396 588 1 0.870 0.01275 0.845 0.895
## 1.421 586 1 0.868 0.01281 0.844 0.894
## 1.424 585 1 0.867 0.01288 0.842 0.892
## 1.426 584 1 0.865 0.01294 0.840 0.891
## 1.440 582 2 0.862 0.01306 0.837 0.888
## 1.448 580 1 0.861 0.01313 0.836 0.887
## 1.459 579 1 0.859 0.01319 0.834 0.886
## 1.462 578 1 0.858 0.01325 0.832 0.884
## 1.473 576 1 0.856 0.01331 0.831 0.883
## 1.481 574 1 0.855 0.01337 0.829 0.881
## 1.489 572 1 0.853 0.01343 0.827 0.880
## 1.495 571 2 0.850 0.01355 0.824 0.877
## 1.511 568 2 0.847 0.01366 0.821 0.875
## 1.536 564 2 0.844 0.01378 0.818 0.872
## 1.574 558 1 0.843 0.01384 0.816 0.870
## 1.582 557 1 0.841 0.01389 0.815 0.869
## 1.602 555 1 0.840 0.01395 0.813 0.868
## 1.607 553 1 0.838 0.01401 0.811 0.866
## 1.618 552 1 0.837 0.01407 0.810 0.865
## 1.624 550 1 0.835 0.01412 0.808 0.863
## 1.662 548 1 0.834 0.01418 0.806 0.862
## 1.665 546 1 0.832 0.01423 0.805 0.861
## 1.673 545 1 0.831 0.01429 0.803 0.859
## 1.700 542 1 0.829 0.01435 0.802 0.858
## 1.722 539 1 0.828 0.01440 0.800 0.856
## 1.725 538 1 0.826 0.01446 0.798 0.855
## 1.777 533 1 0.825 0.01451 0.797 0.854
## 1.780 532 1 0.823 0.01457 0.795 0.852
## 1.821 527 1 0.821 0.01462 0.793 0.851
## 1.837 523 1 0.820 0.01468 0.792 0.849
## 1.856 520 1 0.818 0.01474 0.790 0.848
## 1.864 519 1 0.817 0.01479 0.788 0.846
## 1.870 518 1 0.815 0.01485 0.787 0.845
## 1.878 517 1 0.814 0.01490 0.785 0.843
## 1.892 516 1 0.812 0.01496 0.783 0.842
## 1.922 513 1 0.810 0.01501 0.782 0.840
## 1.927 512 1 0.809 0.01506 0.780 0.839
## 1.933 510 1 0.807 0.01512 0.778 0.837
## 1.936 509 1 0.806 0.01517 0.776 0.836
## 1.999 502 1 0.804 0.01523 0.775 0.834
## 2.004 501 1 0.802 0.01528 0.773 0.833
## 2.012 500 2 0.799 0.01539 0.770 0.830
## 2.018 498 1 0.798 0.01544 0.768 0.828
## 2.021 497 1 0.796 0.01549 0.766 0.827
## 2.062 493 1 0.794 0.01554 0.765 0.825
## 2.081 491 1 0.793 0.01560 0.763 0.824
## 2.086 490 1 0.791 0.01565 0.761 0.822
## 2.089 489 1 0.790 0.01570 0.759 0.821
## 2.094 488 1 0.788 0.01575 0.758 0.819
## 2.100 485 1 0.786 0.01580 0.756 0.818
## 2.122 483 2 0.783 0.01590 0.753 0.815
## 2.130 481 1 0.781 0.01595 0.751 0.813
## 2.138 480 1 0.780 0.01600 0.749 0.812
## 2.144 479 1 0.778 0.01605 0.747 0.810
## 2.146 478 1 0.777 0.01610 0.746 0.809
## 2.152 477 1 0.775 0.01615 0.744 0.807
## 2.182 473 1 0.773 0.01620 0.742 0.806
## 2.207 471 1 0.772 0.01625 0.740 0.804
## 2.218 468 1 0.770 0.01629 0.739 0.803
## 2.229 464 1 0.768 0.01634 0.737 0.801
## 2.248 460 1 0.767 0.01639 0.735 0.799
## 2.270 459 1 0.765 0.01644 0.733 0.798
## 2.305 452 1 0.763 0.01649 0.732 0.796
## 2.352 448 1 0.762 0.01654 0.730 0.795
## 2.379 446 1 0.760 0.01659 0.728 0.793
## 2.390 444 1 0.758 0.01665 0.726 0.792
## 2.396 443 1 0.756 0.01670 0.724 0.790
## 2.412 441 1 0.755 0.01675 0.723 0.788
## 2.453 438 1 0.753 0.01680 0.721 0.787
## 2.480 433 1 0.751 0.01685 0.719 0.785
## 2.505 430 1 0.750 0.01690 0.717 0.783
## 2.508 429 1 0.748 0.01695 0.715 0.782
## 2.516 427 1 0.746 0.01700 0.713 0.780
## 2.530 424 1 0.744 0.01705 0.712 0.778
## 2.533 423 1 0.743 0.01710 0.710 0.777
## 2.549 422 1 0.741 0.01715 0.708 0.775
## 2.552 421 1 0.739 0.01720 0.706 0.774
## 2.568 420 1 0.737 0.01725 0.704 0.772
## 2.576 415 1 0.735 0.01730 0.702 0.770
## 2.585 413 1 0.734 0.01735 0.700 0.768
## 2.601 410 1 0.732 0.01740 0.699 0.767
## 2.615 407 1 0.730 0.01745 0.697 0.765
## 2.628 406 1 0.728 0.01750 0.695 0.763
## 2.637 405 1 0.727 0.01755 0.693 0.762
## 2.667 403 1 0.725 0.01759 0.691 0.760
## 2.675 401 1 0.723 0.01764 0.689 0.758
## 2.691 399 1 0.721 0.01769 0.687 0.757
## 2.732 396 1 0.719 0.01774 0.685 0.755
## 2.738 395 1 0.717 0.01779 0.683 0.753
## 2.754 393 1 0.716 0.01784 0.682 0.751
## 2.793 389 1 0.714 0.01789 0.680 0.750
## 2.798 388 1 0.712 0.01793 0.678 0.748
## 2.834 383 1 0.710 0.01798 0.676 0.746
## 2.847 382 2 0.706 0.01808 0.672 0.743
## 2.856 380 1 0.705 0.01813 0.670 0.741
## 2.891 378 1 0.703 0.01818 0.668 0.739
## 2.894 377 1 0.701 0.01822 0.666 0.737
## 2.932 374 1 0.699 0.01827 0.664 0.736
## 2.949 372 1 0.697 0.01832 0.662 0.734
## 2.973 368 1 0.695 0.01836 0.660 0.732
## 2.979 367 1 0.693 0.01841 0.658 0.730
## 2.982 366 1 0.691 0.01846 0.656 0.728
## 2.995 365 1 0.689 0.01851 0.654 0.727
## 3.003 364 1 0.688 0.01855 0.652 0.725
## 3.025 361 1 0.686 0.01860 0.650 0.723
## 3.058 356 1 0.684 0.01864 0.648 0.721
## 3.072 355 2 0.680 0.01874 0.644 0.718
## 3.075 353 1 0.678 0.01878 0.642 0.716
## 3.086 350 1 0.676 0.01883 0.640 0.714
## 3.097 349 2 0.672 0.01892 0.636 0.710
## 3.099 347 1 0.670 0.01896 0.634 0.708
## 3.107 346 2 0.666 0.01905 0.630 0.705
## 3.124 343 1 0.664 0.01909 0.628 0.703
## 3.132 342 1 0.662 0.01914 0.626 0.701
## 3.143 340 1 0.660 0.01918 0.624 0.699
## 3.149 339 1 0.659 0.01922 0.622 0.697
## 3.162 338 1 0.657 0.01926 0.620 0.695
## 3.168 337 1 0.655 0.01930 0.618 0.694
## 3.190 333 1 0.653 0.01935 0.616 0.692
## 3.217 331 1 0.651 0.01939 0.614 0.690
## 3.225 330 1 0.649 0.01943 0.612 0.688
## 3.231 327 1 0.647 0.01947 0.610 0.686
## 3.274 323 1 0.645 0.01951 0.608 0.684
## 3.277 322 1 0.643 0.01956 0.606 0.682
## 3.280 321 1 0.641 0.01960 0.603 0.680
## 3.310 317 1 0.639 0.01964 0.601 0.678
## 3.335 315 1 0.637 0.01968 0.599 0.676
## 3.337 313 1 0.635 0.01972 0.597 0.675
## 3.373 306 1 0.633 0.01977 0.595 0.673
## 3.389 302 1 0.630 0.01981 0.593 0.671
## 3.409 300 1 0.628 0.01986 0.591 0.669
## 3.411 299 1 0.626 0.01990 0.588 0.667
## 3.452 293 1 0.624 0.01995 0.586 0.665
## 3.458 291 1 0.622 0.01999 0.584 0.662
## 3.469 289 1 0.620 0.02004 0.582 0.660
## 3.483 287 1 0.618 0.02009 0.580 0.658
## 3.518 283 1 0.616 0.02013 0.577 0.656
## 3.521 282 1 0.613 0.02018 0.575 0.654
## 3.526 281 1 0.611 0.02023 0.573 0.652
## 3.532 279 2 0.607 0.02032 0.568 0.648
## 3.537 277 1 0.605 0.02036 0.566 0.646
## 3.556 273 1 0.602 0.02041 0.564 0.644
## 3.562 272 1 0.600 0.02045 0.561 0.642
## 3.576 271 1 0.598 0.02050 0.559 0.639
## 3.578 269 1 0.596 0.02054 0.557 0.637
## 3.592 267 1 0.593 0.02058 0.554 0.635
## 3.608 264 1 0.591 0.02063 0.552 0.633
## 3.617 261 1 0.589 0.02067 0.550 0.631
## 3.630 259 1 0.587 0.02072 0.547 0.629
## 3.636 258 1 0.584 0.02076 0.545 0.627
## 3.639 257 1 0.582 0.02081 0.543 0.624
## 3.677 253 1 0.580 0.02085 0.540 0.622
## 3.682 251 1 0.578 0.02090 0.538 0.620
## 3.713 245 1 0.575 0.02094 0.536 0.618
## 3.729 242 1 0.573 0.02099 0.533 0.615
## 3.737 241 1 0.570 0.02104 0.531 0.613
## 3.754 239 1 0.568 0.02108 0.528 0.611
## 3.762 235 1 0.566 0.02113 0.526 0.609
## 3.784 232 1 0.563 0.02118 0.523 0.606
## 3.808 229 1 0.561 0.02123 0.521 0.604
## 3.814 228 1 0.558 0.02128 0.518 0.602
## 3.822 227 1 0.556 0.02133 0.516 0.599
## 3.825 226 1 0.553 0.02138 0.513 0.597
## 3.828 224 2 0.548 0.02147 0.508 0.592
## 3.833 222 1 0.546 0.02151 0.505 0.590
## 3.858 218 1 0.543 0.02156 0.503 0.587
## 3.869 216 1 0.541 0.02161 0.500 0.585
## 3.890 213 1 0.538 0.02165 0.498 0.583
## 3.918 208 1 0.536 0.02170 0.495 0.580
## 3.937 206 1 0.533 0.02175 0.492 0.578
## 3.943 205 1 0.531 0.02180 0.490 0.575
## 3.953 204 1 0.528 0.02185 0.487 0.573
## 3.967 203 1 0.525 0.02190 0.484 0.570
## 3.981 201 1 0.523 0.02194 0.481 0.568
## 4.005 198 1 0.520 0.02199 0.479 0.565
## 4.030 193 1 0.517 0.02204 0.476 0.562
## 4.036 192 1 0.515 0.02209 0.473 0.560
## 4.044 191 1 0.512 0.02214 0.470 0.557
## 4.052 189 1 0.509 0.02219 0.468 0.555
## 4.066 186 2 0.504 0.02228 0.462 0.549
## 4.071 184 1 0.501 0.02233 0.459 0.547
## 4.079 181 1 0.498 0.02238 0.456 0.544
## 4.090 180 1 0.496 0.02242 0.454 0.542
## 4.099 179 2 0.490 0.02251 0.448 0.536
## 4.104 177 1 0.487 0.02255 0.445 0.534
## 4.175 169 1 0.484 0.02260 0.442 0.531
## 4.194 168 1 0.482 0.02265 0.439 0.528
## 4.200 167 1 0.479 0.02270 0.436 0.525
## 4.205 166 1 0.476 0.02275 0.433 0.522
## 4.216 165 1 0.473 0.02279 0.430 0.520
## 4.225 164 1 0.470 0.02283 0.427 0.517
## 4.241 163 1 0.467 0.02287 0.424 0.514
## 4.257 161 1 0.464 0.02292 0.421 0.511
## 4.260 160 1 0.461 0.02296 0.418 0.509
## 4.263 158 1 0.458 0.02299 0.415 0.506
## 4.266 157 1 0.455 0.02303 0.412 0.503
## 4.279 156 1 0.453 0.02307 0.409 0.500
## 4.290 155 1 0.450 0.02310 0.407 0.497
## 4.298 154 1 0.447 0.02314 0.404 0.494
## 4.326 148 1 0.444 0.02318 0.400 0.492
## 4.331 146 1 0.441 0.02322 0.397 0.489
## 4.334 145 1 0.438 0.02326 0.394 0.486
## 4.356 144 1 0.435 0.02329 0.391 0.483
## 4.359 143 1 0.432 0.02333 0.388 0.480
## 4.370 142 1 0.428 0.02336 0.385 0.477
## 4.381 138 1 0.425 0.02340 0.382 0.474
## 4.422 133 2 0.419 0.02348 0.375 0.468
## 4.438 130 1 0.416 0.02352 0.372 0.464
## 4.441 129 1 0.413 0.02355 0.369 0.461
## 4.444 127 1 0.409 0.02359 0.366 0.458
## 4.465 124 1 0.406 0.02363 0.362 0.455
## 4.479 121 1 0.403 0.02367 0.359 0.452
## 4.504 119 1 0.399 0.02371 0.355 0.449
## 4.507 118 1 0.396 0.02375 0.352 0.445
## 4.517 116 1 0.392 0.02379 0.348 0.442
## 4.528 115 1 0.389 0.02383 0.345 0.439
## 4.545 114 2 0.382 0.02389 0.338 0.432
## 4.553 112 1 0.379 0.02392 0.335 0.429
## 4.567 110 1 0.375 0.02395 0.331 0.425
## 4.569 109 3 0.365 0.02402 0.321 0.415
## 4.594 104 1 0.362 0.02405 0.317 0.412
## 4.600 103 1 0.358 0.02407 0.314 0.408
## 4.621 100 1 0.354 0.02409 0.310 0.405
## 4.627 99 1 0.351 0.02412 0.307 0.401
## 4.630 98 1 0.347 0.02413 0.303 0.398
## 4.654 96 1 0.344 0.02415 0.299 0.394
## 4.660 94 1 0.340 0.02417 0.296 0.391
## 4.674 92 1 0.336 0.02419 0.292 0.387
## 4.679 91 1 0.333 0.02420 0.288 0.384
## 4.742 87 1 0.329 0.02422 0.285 0.380
## 4.767 84 1 0.325 0.02425 0.281 0.376
## 4.775 82 1 0.321 0.02428 0.277 0.372
## 4.791 78 1 0.317 0.02431 0.273 0.368
## 4.802 77 1 0.313 0.02434 0.268 0.364
## 4.816 76 1 0.309 0.02437 0.264 0.360
## 4.838 73 1 0.304 0.02440 0.260 0.356
## 4.893 65 1 0.300 0.02447 0.255 0.352
## 4.901 63 1 0.295 0.02454 0.251 0.347
## 4.942 58 1 0.290 0.02463 0.245 0.342
##
## Stadio=Stadio III
## time n.risk n.event survival std.err lower 95% CI upper 95% CI
## 0.682 144 1 0.993 0.00692 0.9796 1.000
## 0.734 142 1 0.986 0.00979 0.9671 1.000
## 0.805 141 1 0.979 0.01196 0.9559 1.000
## 0.890 139 1 0.972 0.01379 0.9454 0.999
## 0.895 138 1 0.965 0.01539 0.9353 0.996
## 0.953 136 1 0.958 0.01683 0.9255 0.991
## 0.977 134 1 0.951 0.01816 0.9158 0.987
## 0.994 133 1 0.944 0.01938 0.9064 0.982
## 1.043 132 1 0.936 0.02051 0.8971 0.978
## 1.101 131 1 0.929 0.02156 0.8880 0.973
## 1.120 129 1 0.922 0.02256 0.8789 0.967
## 1.125 128 1 0.915 0.02351 0.8699 0.962
## 1.166 126 2 0.900 0.02528 0.8522 0.951
## 1.213 124 1 0.893 0.02610 0.8434 0.946
## 1.232 123 1 0.886 0.02688 0.8347 0.940
## 1.339 121 1 0.879 0.02763 0.8260 0.934
## 1.399 120 1 0.871 0.02836 0.8174 0.929
## 1.405 119 1 0.864 0.02905 0.8088 0.923
## 1.435 116 1 0.856 0.02974 0.8001 0.917
## 1.440 115 1 0.849 0.03040 0.7914 0.911
## 1.465 113 1 0.841 0.03104 0.7828 0.905
## 1.511 111 1 0.834 0.03168 0.7741 0.898
## 1.572 110 1 0.826 0.03228 0.7654 0.892
## 1.582 109 1 0.819 0.03286 0.7568 0.886
## 1.632 108 1 0.811 0.03342 0.7482 0.879
## 1.684 107 1 0.804 0.03396 0.7397 0.873
## 1.747 106 1 0.796 0.03447 0.7312 0.867
## 1.793 104 1 0.788 0.03498 0.7227 0.860
## 1.796 103 1 0.781 0.03547 0.7142 0.853
## 1.826 101 1 0.773 0.03595 0.7056 0.847
## 1.829 100 1 0.765 0.03641 0.6971 0.840
## 2.018 97 1 0.757 0.03688 0.6884 0.833
## 2.062 96 1 0.749 0.03733 0.6797 0.826
## 2.105 95 1 0.742 0.03776 0.6711 0.819
## 2.196 94 1 0.734 0.03818 0.6625 0.812
## 2.376 92 1 0.726 0.03859 0.6539 0.805
## 2.390 91 2 0.710 0.03935 0.6367 0.791
## 2.467 89 1 0.702 0.03971 0.6281 0.784
## 2.576 85 1 0.694 0.04009 0.6192 0.777
## 2.579 84 1 0.685 0.04045 0.6104 0.769
## 2.623 83 1 0.677 0.04080 0.6016 0.762
## 2.642 81 1 0.669 0.04114 0.5927 0.754
## 2.661 80 1 0.660 0.04147 0.5838 0.747
## 2.741 78 1 0.652 0.04179 0.5748 0.739
## 2.749 77 1 0.643 0.04210 0.5659 0.731
## 2.869 73 1 0.635 0.04244 0.5566 0.723
## 2.946 72 1 0.626 0.04275 0.5473 0.715
## 2.954 70 1 0.617 0.04306 0.5379 0.707
## 2.984 69 1 0.608 0.04336 0.5285 0.699
## 3.047 63 1 0.598 0.04373 0.5183 0.690
## 3.143 61 1 0.588 0.04410 0.5080 0.681
## 3.190 59 1 0.578 0.04447 0.4975 0.672
## 3.403 56 1 0.568 0.04486 0.4866 0.663
## 3.450 54 1 0.558 0.04524 0.4756 0.654
## 3.543 53 1 0.547 0.04559 0.4646 0.644
## 3.567 51 1 0.536 0.04594 0.4534 0.634
## 3.625 49 1 0.525 0.04629 0.4420 0.624
## 3.691 47 1 0.514 0.04664 0.4305 0.614
## 3.748 46 1 0.503 0.04694 0.4189 0.604
## 3.756 44 1 0.492 0.04725 0.4072 0.593
## 3.762 43 1 0.480 0.04751 0.3955 0.583
## 3.836 42 1 0.469 0.04774 0.3839 0.572
## 3.896 40 1 0.457 0.04796 0.3720 0.561
## 4.008 38 1 0.445 0.04818 0.3599 0.550
## 4.074 35 1 0.432 0.04845 0.3470 0.538
## 4.107 34 1 0.420 0.04867 0.3342 0.527
## 4.159 33 1 0.407 0.04883 0.3216 0.515
## 4.175 32 1 0.394 0.04893 0.3090 0.503
## 4.186 31 1 0.381 0.04897 0.2966 0.491
## 4.192 30 1 0.369 0.04896 0.2842 0.478
## 4.216 29 1 0.356 0.04890 0.2720 0.466
## 4.364 27 1 0.343 0.04883 0.2593 0.453
## 4.444 24 1 0.329 0.04884 0.2455 0.440
## 4.457 23 1 0.314 0.04876 0.2318 0.426
## 4.496 21 1 0.299 0.04868 0.2176 0.412
## 4.498 20 2 0.269 0.04819 0.1897 0.382
## 4.600 16 1 0.253 0.04803 0.1739 0.367
## 4.624 15 1 0.236 0.04769 0.1585 0.350
## 4.693 14 1 0.219 0.04716 0.1434 0.334
## 4.717 13 1 0.202 0.04644 0.1287 0.317
## 4.854 8 1 0.177 0.04700 0.1050 0.298
## 4.901 7 1 0.152 0.04658 0.0829 0.277
##
## Stadio=Stadio IV
## time n.risk n.event survival std.err lower 95% CI upper 95% CI
## 0.515 202 1 0.9950 0.00494 0.9854 1.0000
## 0.548 201 1 0.9901 0.00697 0.9765 1.0000
## 0.597 200 2 0.9802 0.00980 0.9612 0.9996
## 0.619 198 1 0.9752 0.01093 0.9541 0.9969
## 0.660 197 1 0.9703 0.01194 0.9472 0.9940
## 0.671 196 1 0.9653 0.01287 0.9405 0.9909
## 0.758 193 1 0.9603 0.01374 0.9338 0.9877
## 0.808 192 1 0.9553 0.01455 0.9272 0.9843
## 0.816 191 1 0.9503 0.01531 0.9208 0.9808
## 0.830 190 1 0.9453 0.01603 0.9144 0.9773
## 0.832 189 1 0.9403 0.01670 0.9082 0.9737
## 0.835 188 1 0.9353 0.01735 0.9019 0.9700
## 0.876 187 1 0.9303 0.01796 0.8958 0.9662
## 0.920 186 1 0.9253 0.01855 0.8897 0.9624
## 0.950 185 1 0.9203 0.01911 0.8836 0.9586
## 1.002 184 1 0.9153 0.01965 0.8776 0.9547
## 1.016 183 1 0.9103 0.02017 0.8716 0.9507
## 1.021 182 1 0.9053 0.02067 0.8657 0.9468
## 1.040 181 1 0.9003 0.02115 0.8598 0.9427
## 1.054 180 1 0.8953 0.02162 0.8539 0.9387
## 1.062 178 1 0.8903 0.02207 0.8481 0.9346
## 1.101 177 1 0.8853 0.02251 0.8422 0.9305
## 1.103 176 1 0.8802 0.02294 0.8364 0.9264
## 1.106 175 1 0.8752 0.02336 0.8306 0.9222
## 1.112 174 1 0.8702 0.02376 0.8248 0.9180
## 1.125 173 1 0.8651 0.02415 0.8191 0.9138
## 1.139 172 2 0.8551 0.02489 0.8077 0.9053
## 1.188 170 1 0.8501 0.02525 0.8020 0.9010
## 1.202 169 1 0.8450 0.02559 0.7963 0.8967
## 1.232 168 1 0.8400 0.02593 0.7907 0.8924
## 1.248 167 2 0.8299 0.02658 0.7794 0.8837
## 1.265 165 1 0.8249 0.02689 0.7738 0.8793
## 1.273 164 1 0.8199 0.02719 0.7683 0.8749
## 1.279 163 1 0.8148 0.02749 0.7627 0.8705
## 1.281 162 1 0.8098 0.02777 0.7572 0.8661
## 1.309 161 1 0.8048 0.02805 0.7516 0.8617
## 1.322 160 2 0.7947 0.02859 0.7406 0.8528
## 1.333 158 1 0.7897 0.02885 0.7351 0.8483
## 1.344 157 1 0.7847 0.02910 0.7297 0.8438
## 1.347 156 1 0.7796 0.02934 0.7242 0.8393
## 1.352 155 1 0.7746 0.02958 0.7187 0.8348
## 1.355 154 1 0.7696 0.02981 0.7133 0.8303
## 1.410 153 1 0.7645 0.03004 0.7079 0.8258
## 1.421 152 1 0.7595 0.03026 0.7025 0.8212
## 1.446 151 1 0.7545 0.03048 0.6971 0.8166
## 1.481 150 1 0.7495 0.03069 0.6917 0.8121
## 1.492 149 1 0.7444 0.03089 0.6863 0.8075
## 1.495 148 2 0.7344 0.03128 0.6755 0.7983
## 1.517 145 1 0.7293 0.03147 0.6702 0.7937
## 1.580 143 1 0.7242 0.03166 0.6647 0.7890
## 1.588 142 1 0.7191 0.03185 0.6593 0.7843
## 1.593 141 1 0.7140 0.03203 0.6539 0.7796
## 1.629 140 1 0.7089 0.03220 0.6485 0.7749
## 1.667 138 1 0.7038 0.03238 0.6431 0.7702
## 1.684 137 1 0.6986 0.03254 0.6377 0.7654
## 1.725 136 1 0.6935 0.03271 0.6323 0.7607
## 1.739 135 1 0.6884 0.03287 0.6269 0.7559
## 1.747 134 1 0.6832 0.03302 0.6215 0.7511
## 1.758 133 1 0.6781 0.03317 0.6161 0.7463
## 1.766 132 1 0.6729 0.03331 0.6107 0.7415
## 1.807 131 1 0.6678 0.03345 0.6054 0.7367
## 1.834 130 1 0.6627 0.03359 0.6000 0.7319
## 1.911 129 1 0.6575 0.03372 0.5947 0.7271
## 1.941 128 1 0.6524 0.03384 0.5893 0.7222
## 1.952 127 1 0.6473 0.03396 0.5840 0.7174
## 1.979 126 1 0.6421 0.03408 0.5787 0.7125
## 1.982 125 1 0.6370 0.03419 0.5734 0.7077
## 2.059 124 1 0.6318 0.03430 0.5681 0.7028
## 2.122 123 1 0.6267 0.03440 0.5628 0.6979
## 2.185 122 2 0.6164 0.03460 0.5522 0.6881
## 2.220 120 1 0.6113 0.03469 0.5470 0.6832
## 2.251 119 1 0.6062 0.03478 0.5417 0.6783
## 2.261 118 1 0.6010 0.03486 0.5364 0.6734
## 2.275 117 1 0.5959 0.03494 0.5312 0.6685
## 2.311 116 1 0.5908 0.03501 0.5260 0.6635
## 2.327 115 1 0.5856 0.03508 0.5207 0.6586
## 2.349 114 1 0.5805 0.03515 0.5155 0.6536
## 2.418 113 1 0.5753 0.03521 0.5103 0.6487
## 2.434 112 1 0.5702 0.03527 0.5051 0.6437
## 2.453 111 1 0.5651 0.03532 0.4999 0.6387
## 2.478 110 1 0.5599 0.03537 0.4947 0.6337
## 2.497 109 1 0.5548 0.03542 0.4895 0.6287
## 2.508 108 1 0.5497 0.03546 0.4844 0.6237
## 2.519 107 1 0.5445 0.03550 0.4792 0.6187
## 2.533 106 1 0.5394 0.03554 0.4740 0.6137
## 2.557 105 1 0.5342 0.03557 0.4689 0.6087
## 2.582 104 1 0.5291 0.03560 0.4637 0.6037
## 2.623 101 1 0.5239 0.03563 0.4585 0.5986
## 2.656 100 1 0.5186 0.03565 0.4533 0.5934
## 2.667 99 1 0.5134 0.03568 0.4480 0.5883
## 2.691 98 1 0.5082 0.03569 0.4428 0.5832
## 2.768 97 1 0.5029 0.03571 0.4376 0.5780
## 2.790 96 1 0.4977 0.03572 0.4324 0.5728
## 2.795 95 1 0.4924 0.03572 0.4272 0.5677
## 2.809 94 1 0.4872 0.03573 0.4220 0.5625
## 2.875 93 2 0.4767 0.03572 0.4116 0.5521
## 2.919 91 1 0.4715 0.03571 0.4064 0.5469
## 2.979 90 1 0.4662 0.03569 0.4013 0.5417
## 2.992 89 1 0.4610 0.03567 0.3961 0.5365
## 3.069 88 1 0.4558 0.03565 0.3910 0.5313
## 3.154 87 1 0.4505 0.03562 0.3858 0.5261
## 3.162 86 1 0.4453 0.03559 0.3807 0.5208
## 3.181 85 1 0.4400 0.03556 0.3756 0.5156
## 3.253 84 2 0.4296 0.03548 0.3654 0.5050
## 3.272 82 1 0.4243 0.03543 0.3603 0.4998
## 3.283 81 1 0.4191 0.03538 0.3552 0.4945
## 3.310 80 1 0.4139 0.03532 0.3501 0.4892
## 3.346 79 1 0.4086 0.03526 0.3450 0.4839
## 3.384 78 1 0.4034 0.03519 0.3400 0.4786
## 3.395 77 1 0.3981 0.03512 0.3349 0.4733
## 3.428 76 1 0.3929 0.03505 0.3299 0.4680
## 3.431 75 1 0.3877 0.03497 0.3248 0.4626
## 3.491 72 1 0.3823 0.03490 0.3196 0.4572
## 3.504 71 1 0.3769 0.03482 0.3145 0.4517
## 3.532 70 1 0.3715 0.03474 0.3093 0.4462
## 3.543 69 1 0.3661 0.03465 0.3041 0.4407
## 3.600 68 1 0.3607 0.03455 0.2990 0.4352
## 3.603 67 1 0.3554 0.03445 0.2939 0.4297
## 3.606 66 1 0.3500 0.03435 0.2887 0.4242
## 3.636 64 2 0.3390 0.03414 0.2783 0.4130
## 3.688 62 1 0.3336 0.03402 0.2731 0.4074
## 3.759 61 1 0.3281 0.03390 0.2680 0.4017
## 3.765 60 1 0.3226 0.03377 0.2628 0.3961
## 3.822 59 1 0.3172 0.03364 0.2576 0.3905
## 3.830 58 1 0.3117 0.03350 0.2525 0.3848
## 3.836 57 1 0.3062 0.03336 0.2474 0.3791
## 3.871 56 1 0.3008 0.03321 0.2422 0.3734
## 3.882 55 3 0.2844 0.03272 0.2269 0.3563
## 3.893 52 1 0.2789 0.03254 0.2219 0.3506
## 3.940 50 1 0.2733 0.03237 0.2167 0.3447
## 3.945 49 1 0.2677 0.03218 0.2115 0.3389
## 3.970 48 1 0.2622 0.03199 0.2064 0.3330
## 3.978 47 1 0.2566 0.03179 0.2012 0.3271
## 3.981 46 1 0.2510 0.03159 0.1961 0.3212
## 3.995 45 1 0.2454 0.03138 0.1910 0.3153
## 4.033 44 2 0.2343 0.03092 0.1809 0.3034
## 4.038 42 1 0.2287 0.03069 0.1758 0.2975
## 4.099 40 1 0.2230 0.03045 0.1706 0.2914
## 4.148 39 1 0.2173 0.03020 0.1654 0.2853
## 4.164 38 1 0.2115 0.02994 0.1603 0.2792
## 4.167 37 1 0.2058 0.02967 0.1552 0.2730
## 4.186 36 1 0.2001 0.02939 0.1500 0.2669
## 4.192 35 1 0.1944 0.02910 0.1449 0.2607
## 4.197 34 1 0.1887 0.02880 0.1399 0.2545
## 4.211 33 1 0.1829 0.02849 0.1348 0.2483
## 4.233 32 1 0.1772 0.02817 0.1298 0.2420
## 4.260 31 1 0.1715 0.02784 0.1248 0.2357
## 4.268 30 1 0.1658 0.02749 0.1198 0.2295
## 4.405 28 1 0.1599 0.02714 0.1146 0.2230
## 4.424 27 1 0.1540 0.02677 0.1095 0.2165
## 4.465 26 1 0.1480 0.02639 0.1044 0.2099
## 4.479 25 1 0.1421 0.02599 0.0993 0.2034
## 4.537 24 1 0.1362 0.02557 0.0943 0.1968
## 4.542 23 1 0.1303 0.02514 0.0892 0.1901
## 4.567 22 1 0.1243 0.02468 0.0843 0.1835
## 4.572 21 1 0.1184 0.02421 0.0793 0.1768
## 4.575 20 1 0.1125 0.02371 0.0744 0.1700
## 4.591 18 1 0.1063 0.02320 0.0693 0.1630
## 4.602 17 1 0.1000 0.02266 0.0641 0.1559
## 4.616 16 1 0.0938 0.02209 0.0591 0.1488
## 4.649 15 1 0.0875 0.02148 0.0541 0.1416
## 4.668 14 1 0.0813 0.02084 0.0492 0.1343
## 4.704 13 1 0.0750 0.02015 0.0443 0.1270
## 4.717 12 1 0.0688 0.01942 0.0395 0.1196
## 4.753 11 2 0.0563 0.01779 0.0303 0.1045
## 4.789 8 1 0.0492 0.01690 0.0251 0.0965
## 4.794 7 1 0.0422 0.01588 0.0202 0.0882
## 4.797 6 1 0.0352 0.01471 0.0155 0.0798
## 4.802 5 1 0.0281 0.01334 0.0111 0.0713
## 4.824 3 1 0.0188 0.01173 0.0055 0.0639
ggsurvplot(fit, data = colon, risk.table = TRUE, conf.int = TRUE, surv.median.line = "h", pval = TRUE, censor.size=2.5, risk.table.fontsize = 3, risk.table.height = 0.35, censor.shape="|", xlab="Time (years)", legend = "right")
Dal grafico della sopravvivenza di Kaplan-Meier risulta piuttosto evidente una differenza sul trend della sopravvivenza per stadio.
Si esegue un test di ipotesi log-rank per valutare se la differenza è significativa.
survdiff(Surv(survtime,as.numeric(dead)) ~ Stadio,data=colon)
## Call:
## survdiff(formula = Surv(survtime, as.numeric(dead)) ~ Stadio,
## data = colon)
##
## N Observed Expected (O-E)^2/E (O-E)^2/V
## Stadio=Stadio I 228 92 126.6 9.448 11.54
## Stadio=Stadio II 729 347 407.1 8.861 20.93
## Stadio=Stadio III 145 85 76.3 0.988 1.11
## Stadio=Stadio IV 202 183 97.0 76.136 88.71
##
## Chisq= 96 on 3 degrees of freedom, p= <2e-16
Il test ha un p-value inferiore a 2e-16, dunque si rigetta l’ipotesi nulla: la differenza tra gli azzardi è statisticamente significativa.
Si applica un modello di regressione logistica per valutare l’associazione.
modello <- glm(dead ~ relevel(sex, "Male"), data = colon, family = binomial())
summary(modello)
##
## Call:
## glm(formula = dead ~ relevel(sex, "Male"), family = binomial(),
## data = colon)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.38846 0.08081 4.807 1.53e-06 ***
## relevel(sex, "Male")Female -0.42439 0.11189 -3.793 0.000149 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 1798.4 on 1303 degrees of freedom
## Residual deviance: 1784.0 on 1302 degrees of freedom
## AIC: 1788
##
## Number of Fisher Scoring iterations: 4
exp(cbind("OR" = coef(modello), confint.default(modello, level = 0.95)))
## OR 2.5 % 97.5 %
## (Intercept) 1.4747082 1.2587054 1.7277786
## relevel(sex, "Male")Female 0.6541673 0.5253483 0.8145737
La misura di effetto ricavata dal modello è l’ODDS Ratio, pari a 0.65. Ciò significa che gli uomini hanno un valore di ODDS di morte pari al 65% rispetto a quello delle donne.
Per studiare l’associazione tra variabili e mortalità si applica un modello di regressione logistica usando come covariate tutte le variabili del dataset.
modello10 <- glm(dead ~ relevel(sex, "Male") + Stadio + geneticm + smoke + married + kids + work + education + age, data = colon, family = binomial())
summary(modello10)
##
## Call:
## glm(formula = dead ~ relevel(sex, "Male") + Stadio + geneticm +
## smoke + married + kids + work + education + age, family = binomial(),
## data = colon)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -5.815193 0.477786 -12.171 < 2e-16 ***
## relevel(sex, "Male")Female -0.534912 0.136367 -3.923 8.76e-05 ***
## StadioStadio II 0.549433 0.184347 2.980 0.00288 **
## StadioStadio III 1.126459 0.252291 4.465 8.01e-06 ***
## StadioStadio IV 3.347308 0.306252 10.930 < 2e-16 ***
## geneticm1 2.479183 0.294018 8.432 < 2e-16 ***
## smokeyes 0.502663 0.169317 2.969 0.00299 **
## marriedyes -0.012706 0.170209 -0.075 0.94050
## kidsyes 0.215680 0.136436 1.581 0.11392
## workyes 0.344326 0.297067 1.159 0.24642
## educationmedium/high 0.761616 0.239466 3.180 0.00147 **
## age 0.103506 0.008117 12.752 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 1798.4 on 1303 degrees of freedom
## Residual deviance: 1312.1 on 1292 degrees of freedom
## AIC: 1336.1
##
## Number of Fisher Scoring iterations: 5
exp(cbind("OR" = coef(modello10), confint.default(modello10, level = 0.95)))
## OR 2.5 % 97.5 %
## (Intercept) 0.002981905 0.001168964 0.007606527
## relevel(sex, "Male")Female 0.585720611 0.448347653 0.765184408
## StadioStadio II 1.732270933 1.206978151 2.486178050
## StadioStadio III 3.084715555 1.881330155 5.057841673
## StadioStadio IV 28.426112068 15.596802877 51.808300309
## geneticm1 11.931508436 6.705429685 21.230689195
## smokeyes 1.653117867 1.186263909 2.303702118
## marriedyes 0.987374781 0.707293651 1.378365206
## kidsyes 1.240704680 0.949584219 1.621075913
## workyes 1.411037876 0.788270339 2.525818603
## educationmedium/high 2.141734517 1.339465343 3.424520661
## age 1.109051971 1.091548319 1.126836304
Tutte le variabili testate, ad eccezione di “married”, “kids” e “work”, hanno una associazione significativa con la mortalità, e quindi un OR significativamente diverso da 1.
Si studia la correlazione tra morti e sesso, valutando la presenza di confondenti o modificatori tramite stratificazione.
La prima variabile studiata come eventuale confondente o modificatore di effetto è il fattore genetico.
cont_table_geneticm <- table(sex = colon$sex,
dead = relevel(colon$dead, "1"),
genetic = colon$geneticm)
strat_geneticm<-epi.2by2(dat=cont_table_geneticm , method="cohort.count")
strat_geneticm$massoc.detail$RR.strata.wald
## est lower upper
## 1 0.801979 0.7160920 0.8981671
## 2 1.006040 0.8774716 1.1534458
strat_geneticm$massoc.detail$OR.strata.wald
## est lower upper
## 1 0.6379555 0.5068117 0.8030344
## 2 1.0460526 0.3760059 2.9101304
Si osserva una differenza sia tra gli ODDS Ratio che tra i Rischi Relativi. Si verifica se la differenza è significativa tramite il test di omogeneità.
strat_geneticm$massoc.detail$wRR.homog
## test.statistic df p.value
## 1 6.261811 1 0.01233681
strat_geneticm$massoc.detail$wOR.homog
## test.statistic df p.value
## 1 0.8725141 1 0.3502602
Il test di omogeneità risulta significativo per i Rischi Relativi: il fattore genetico è un modificatore d’effetto per questa misura. Il test di omogeneità sugli OR risulta non significativo.
strat_geneticm
## Outcome + Outcome - Total Inc risk *
## Exposed + 328 340 668 49.10 (45.25 to 52.96)
## Exposed - 379 257 636 59.59 (55.66 to 63.43)
## Total 707 597 1304 54.22 (51.47 to 56.95)
##
##
## Point estimates and 95% CIs:
## -------------------------------------------------------------------
## Inc risk ratio (crude) 0.82 (0.75, 0.91)
## Inc risk ratio (M-H) 0.83 (0.75, 0.92)
## Inc risk ratio (crude:M-H) 0.99
## Odds ratio (crude) 0.65 (0.53, 0.81)
## Odds ratio (M-H) 0.65 (0.52, 0.82)
## Odds ratio (crude:M-H) 1.00
## Attrib risk in the exposed (crude) * -10.49 (-15.87, -5.11)
## Attrib risk in the exposed (M-H) * -10.05 (-15.43, -4.66)
## Attrib risk (crude:M-H) 1.04
## -------------------------------------------------------------------
## M-H test of homogeneity of IRRs: chi2(1) = 6.262 Pr>chi2 = 0.012
## M-H test of homogeneity of ORs: chi2(1) = 0.873 Pr>chi2 = 0.350
## Test that M-H adjusted OR = 1: chi2(1) = 13.859 Pr>chi2 = <0.001
## Wald confidence limits
## M-H: Mantel-Haenszel; CI: confidence interval
## * Outcomes per 100 population units
Il rapporto tra l’OR crudo e l’OR di MH è pari a 1: il fattore genetico non è un confondente per l’OR.
Si valutano i RR separatamente per sesso.
cont_table_geneticm_male <- table(genetic = relevel(colon$geneticm, "1")[colon$sex=="Male"],
dead = relevel(colon$dead, "1")[colon$sex=="Male"])
strat_geneticm_male<-epi.2by2(dat=cont_table_geneticm_male, method="cohort.count")
strat_geneticm_male
## Outcome + Outcome - Total Inc risk *
## Exposed + 57 9 66 86.36 (75.69 to 93.57)
## Exposed - 322 248 570 56.49 (52.31 to 60.61)
## Total 379 257 636 59.59 (55.66 to 63.43)
##
## Point estimates and 95% CIs:
## -------------------------------------------------------------------
## Inc risk ratio 1.53 (1.36, 1.72)
## Odds ratio 4.88 (2.37, 10.04)
## Attrib risk in the exposed * 29.87 (20.65, 39.10)
## Attrib fraction in the exposed (%) 34.59 (26.26, 41.98)
## Attrib risk in the population * 3.10 (-2.48, 8.68)
## Attrib fraction in the population (%) 5.20 (3.13, 7.23)
## -------------------------------------------------------------------
## Uncorrected chi2 test that OR = 1: chi2(1) = 21.920 Pr>chi2 = <0.001
## Fisher exact test that OR = 1: Pr>chi2 = <0.001
## Wald confidence limits
## CI: confidence interval
## * Outcomes per 100 population units
cont_table_geneticm_female <- table(genetic = relevel(colon$geneticm, "1")[colon$sex=="Female"],
dead = relevel(colon$dead, "1")[colon$sex=="Female"])
strat_geneticm_female<-epi.2by2(dat=cont_table_geneticm_female, method="cohort.count")
strat_geneticm_female
## Outcome + Outcome - Total Inc risk *
## Exposed + 53 8 61 86.89 (75.78 to 94.16)
## Exposed - 275 332 607 45.30 (41.29 to 49.36)
## Total 328 340 668 49.10 (45.25 to 52.96)
##
## Point estimates and 95% CIs:
## -------------------------------------------------------------------
## Inc risk ratio 1.92 (1.68, 2.19)
## Odds ratio 8.00 (3.74, 17.11)
## Attrib risk in the exposed * 41.58 (32.23, 50.93)
## Attrib fraction in the exposed (%) 47.86 (40.56, 54.26)
## Attrib risk in the population * 3.80 (-1.69, 9.28)
## Attrib fraction in the population (%) 7.73 (5.10, 10.29)
## -------------------------------------------------------------------
## Uncorrected chi2 test that OR = 1: chi2(1) = 38.346 Pr>chi2 = <0.001
## Fisher exact test that OR = 1: Pr>chi2 = <0.001
## Wald confidence limits
## CI: confidence interval
## * Outcomes per 100 population units
L’effetto del fattore genetico negli uomini è maggiore rispetto alle donne: se si considerano gli uomini come classe di riferimento, l’interazione è positiva.
Si studia ora la variabile “smoke”.
cont_table_smoke <- table(sex = colon$sex,
dead = relevel(colon$dead, "1"),
smoke = colon$smoke)
strat_smoke<-epi.2by2(dat=cont_table_smoke , method="cohort.count")
strat_smoke$massoc.detail$RR.strata.wald
## est lower upper
## 1 0.8094844 0.7204208 0.9095585
## 2 0.8903831 0.7353834 1.0780527
strat_smoke$massoc.detail$OR.strata.wald
## est lower upper
## 1 0.6408747 0.5015922 0.8188332
## 2 0.7373331 0.4475340 1.2147903
In questo caso entrambe le misure di effetto sono molto simili in entrambi gli strati. Ci si aspetta che i test non siano significativi.
strat_smoke$massoc.detail$wRR.homog
## test.statistic df p.value
## 1 0.6947805 1 0.4045431
strat_smoke$massoc.detail$wOR.homog
## test.statistic df p.value
## 1 0.2509898 1 0.616379
In entrambi i casi i test non sono significativi: la variabile non è un modificatore di effetto ed è possibile calcolare una misura di effetto comune tramite il metodo di Mantel Haenszel.
strat_smoke
## Outcome + Outcome - Total Inc risk *
## Exposed + 328 340 668 49.10 (45.25 to 52.96)
## Exposed - 379 257 636 59.59 (55.66 to 63.43)
## Total 707 597 1304 54.22 (51.47 to 56.95)
##
##
## Point estimates and 95% CIs:
## -------------------------------------------------------------------
## Inc risk ratio (crude) 0.82 (0.75, 0.91)
## Inc risk ratio (M-H) 0.83 (0.75, 0.91)
## Inc risk ratio (crude:M-H) 1.00
## Odds ratio (crude) 0.65 (0.53, 0.81)
## Odds ratio (M-H) 0.66 (0.53, 0.82)
## Odds ratio (crude:M-H) 0.99
## Attrib risk in the exposed (crude) * -10.49 (-15.87, -5.11)
## Attrib risk in the exposed (M-H) * -10.27 (-15.77, -4.77)
## Attrib risk (crude:M-H) 1.02
## -------------------------------------------------------------------
## M-H test of homogeneity of IRRs: chi2(1) = 0.695 Pr>chi2 = 0.405
## M-H test of homogeneity of ORs: chi2(1) = 0.251 Pr>chi2 = 0.616
## Test that M-H adjusted OR = 1: chi2(1) = 13.890 Pr>chi2 = <0.001
## Wald confidence limits
## M-H: Mantel-Haenszel; CI: confidence interval
## * Outcomes per 100 population units
Dal rapporto tra l’OR crudo e quello di MH, si evince che la variabile “smoke” non è un confondente per questa misura di effetto. Analogamente accade per il RR.
Si procede ora alla valutazione della variabile “married”.
cont_table_married <- table(sex = colon$sex,
dead = relevel(colon$dead, "1"),
married = colon$married)
strat_married<-epi.2by2(dat=cont_table_married , method="cohort.count")
strat_married$massoc.detail$RR.strata.wald
## est lower upper
## 1 0.7352941 0.5892014 0.9176105
## 2 0.8480901 0.7578373 0.9490914
strat_married$massoc.detail$OR.strata.wald
## est lower upper
## 1 0.5000000 0.3042526 0.8216857
## 2 0.6984476 0.5468706 0.8920373
strat_married$massoc.detail$wRR.homog
## test.statistic df p.value
## 1 1.267628 1 0.2602122
strat_married$massoc.detail$wOR.homog
## test.statistic df p.value
## 1 1.368224 1 0.2421172
strat_married
## Outcome + Outcome - Total Inc risk *
## Exposed + 328 340 668 49.10 (45.25 to 52.96)
## Exposed - 379 257 636 59.59 (55.66 to 63.43)
## Total 707 597 1304 54.22 (51.47 to 56.95)
##
##
## Point estimates and 95% CIs:
## -------------------------------------------------------------------
## Inc risk ratio (crude) 0.82 (0.75, 0.91)
## Inc risk ratio (M-H) 0.82 (0.75, 0.91)
## Inc risk ratio (crude:M-H) 1.00
## Odds ratio (crude) 0.65 (0.53, 0.81)
## Odds ratio (M-H) 0.65 (0.53, 0.81)
## Odds ratio (crude:M-H) 1.00
## Attrib risk in the exposed (crude) * -10.49 (-15.87, -5.11)
## Attrib risk in the exposed (M-H) * -10.50 (-16.00, -5.00)
## Attrib risk (crude:M-H) 1.00
## -------------------------------------------------------------------
## M-H test of homogeneity of IRRs: chi2(1) = 1.268 Pr>chi2 = 0.260
## M-H test of homogeneity of ORs: chi2(1) = 1.368 Pr>chi2 = 0.242
## Test that M-H adjusted OR = 1: chi2(1) = 14.445 Pr>chi2 = <0.001
## Wald confidence limits
## M-H: Mantel-Haenszel; CI: confidence interval
## * Outcomes per 100 population units
Si osserva che la variabile non è un confondente né un modificatore di effetto per nessuna delle due misure di effetto calcolate.
Si procede ora alla valutazione della variabile “kids”.
cont_table_kids <- table(sex = colon$sex,
dead = relevel(colon$dead, "1"),
kids = colon$kids)
strat_kids<-epi.2by2(dat=cont_table_kids , method="cohort.count")
strat_kids$massoc.detail$RR.strata.wald
## est lower upper
## 1 0.8076923 0.7047437 0.9256796
## 2 0.8448197 0.7286627 0.9794933
strat_kids$massoc.detail$OR.strata.wald
## est lower upper
## 1 0.6301775 0.4695557 0.8457436
## 2 0.6864287 0.4939264 0.9539567
strat_kids$massoc.detail$wRR.homog
## test.statistic df p.value
## 1 0.1917273 1 0.6614829
strat_kids$massoc.detail$wOR.homog
## test.statistic df p.value
## 1 0.1446491 1 0.7037022
strat_kids
## Outcome + Outcome - Total Inc risk *
## Exposed + 328 340 668 49.10 (45.25 to 52.96)
## Exposed - 379 257 636 59.59 (55.66 to 63.43)
## Total 707 597 1304 54.22 (51.47 to 56.95)
##
##
## Point estimates and 95% CIs:
## -------------------------------------------------------------------
## Inc risk ratio (crude) 0.82 (0.75, 0.91)
## Inc risk ratio (M-H) 0.82 (0.75, 0.91)
## Inc risk ratio (crude:M-H) 1.00
## Odds ratio (crude) 0.65 (0.53, 0.81)
## Odds ratio (M-H) 0.65 (0.53, 0.82)
## Odds ratio (crude:M-H) 1.00
## Attrib risk in the exposed (crude) * -10.49 (-15.87, -5.11)
## Attrib risk in the exposed (M-H) * -10.47 (-15.97, -4.97)
## Attrib risk (crude:M-H) 1.00
## -------------------------------------------------------------------
## M-H test of homogeneity of IRRs: chi2(1) = 0.192 Pr>chi2 = 0.661
## M-H test of homogeneity of ORs: chi2(1) = 0.145 Pr>chi2 = 0.704
## Test that M-H adjusted OR = 1: chi2(1) = 14.377 Pr>chi2 = <0.001
## Wald confidence limits
## M-H: Mantel-Haenszel; CI: confidence interval
## * Outcomes per 100 population units
La variabile non è né confondente né modificatore di effetto.
Si procede ora alla valutazione della variabile “work”.
cont_table_work <- table(sex = colon$sex,
dead = relevel(colon$dead, "1"),
work = colon$work)
strat_work<-epi.2by2(dat=cont_table_work , method="cohort.count")
strat_work$massoc.detail$RR.strata.wald
## est lower upper
## 1 0.8371720 0.7551517 0.9281009
## 2 0.6252723 0.3954178 0.9887403
strat_work$massoc.detail$OR.strata.wald
## est lower upper
## 1 0.677397 0.5405104 0.8489508
## 2 0.362963 0.1418190 0.9289457
strat_work$massoc.detail$wRR.homog
## test.statistic df p.value
## 1 1.483023 1 0.2233021
strat_work$massoc.detail$wOR.homog
## test.statistic df p.value
## 1 1.510606 1 0.2190466
strat_work
## Outcome + Outcome - Total Inc risk *
## Exposed + 328 340 668 49.10 (45.25 to 52.96)
## Exposed - 379 257 636 59.59 (55.66 to 63.43)
## Total 707 597 1304 54.22 (51.47 to 56.95)
##
##
## Point estimates and 95% CIs:
## -------------------------------------------------------------------
## Inc risk ratio (crude) 0.82 (0.75, 0.91)
## Inc risk ratio (M-H) 0.82 (0.74, 0.91)
## Inc risk ratio (crude:M-H) 1.00
## Odds ratio (crude) 0.65 (0.53, 0.81)
## Odds ratio (M-H) 0.65 (0.53, 0.81)
## Odds ratio (crude:M-H) 1.00
## Attrib risk in the exposed (crude) * -10.49 (-15.87, -5.11)
## Attrib risk in the exposed (M-H) * -10.49 (-15.99, -5.00)
## Attrib risk (crude:M-H) 1.00
## -------------------------------------------------------------------
## M-H test of homogeneity of IRRs: chi2(1) = 1.483 Pr>chi2 = 0.223
## M-H test of homogeneity of ORs: chi2(1) = 1.511 Pr>chi2 = 0.219
## Test that M-H adjusted OR = 1: chi2(1) = 14.414 Pr>chi2 = <0.001
## Wald confidence limits
## M-H: Mantel-Haenszel; CI: confidence interval
## * Outcomes per 100 population units
La variabile non è né confondente né modificatore di effetto.
Si procede ora alla valutazione della variabile “education”.
cont_table_education <- table(sex = colon$sex,
dead = relevel(colon$dead, "1"),
education = colon$education)
strat_education<-epi.2by2(dat=cont_table_education , method="cohort.count")
strat_education$massoc.detail$RR.strata.wald
## est lower upper
## 1 0.7946254 0.7133511 0.8851595
## 2 1.1481481 0.8916910 1.4783644
strat_education$massoc.detail$OR.strata.wald
## est lower upper
## 1 0.612000 0.4863317 0.770141
## 2 1.533333 0.6976555 3.370017
strat_education$massoc.detail$wRR.homog
## test.statistic df p.value
## 1 6.887831 1 0.00867845
strat_education$massoc.detail$wOR.homog
## test.statistic df p.value
## 1 4.791631 1 0.02859834
Il test sull’omogeneità dei Rischi Relativi è significativo: la variabile è un modificatore di effetto per il RR.
strat_education
## Outcome + Outcome - Total Inc risk *
## Exposed + 328 340 668 49.10 (45.25 to 52.96)
## Exposed - 379 257 636 59.59 (55.66 to 63.43)
## Total 707 597 1304 54.22 (51.47 to 56.95)
##
##
## Point estimates and 95% CIs:
## -------------------------------------------------------------------
## Inc risk ratio (crude) 0.82 (0.75, 0.91)
## Inc risk ratio (M-H) 0.83 (0.75, 0.91)
## Inc risk ratio (crude:M-H) 1.00
## Odds ratio (crude) 0.65 (0.53, 0.81)
## Odds ratio (M-H) 0.66 (0.53, 0.82)
## Odds ratio (crude:M-H) 0.99
## Attrib risk in the exposed (crude) * -10.49 (-15.87, -5.11)
## Attrib risk in the exposed (M-H) * -10.26 (-15.78, -4.74)
## Attrib risk (crude:M-H) 1.02
## -------------------------------------------------------------------
## M-H test of homogeneity of IRRs: chi2(1) = 6.888 Pr>chi2 = 0.009
## M-H test of homogeneity of ORs: chi2(1) = 4.792 Pr>chi2 = 0.029
## Test that M-H adjusted OR = 1: chi2(1) = 13.878 Pr>chi2 = <0.001
## Wald confidence limits
## M-H: Mantel-Haenszel; CI: confidence interval
## * Outcomes per 100 population units
“education” non è un confondente per l’OR.
Si procede a stimare il RR per maschi e femmine separatamente.
cont_table_education_male <- table(education = relevel(colon$education, "medium/high")[colon$sex=="Male"],
dead = relevel(colon$dead, "1")[colon$sex=="Male"])
strat_education_male<-epi.2by2(dat=cont_table_education_male, method="cohort.count")
strat_education_male
## Outcome + Outcome - Total Inc risk *
## Exposed + 39 23 62 62.90 (49.69 to 74.84)
## Exposed - 340 234 574 59.23 (55.09 to 63.28)
## Total 379 257 636 59.59 (55.66 to 63.43)
##
## Point estimates and 95% CIs:
## -------------------------------------------------------------------
## Inc risk ratio 1.06 (0.87, 1.30)
## Odds ratio 1.17 (0.68, 2.01)
## Attrib risk in the exposed * 3.67 (-9.01, 16.35)
## Attrib fraction in the exposed (%) 5.83 (-15.34, 23.12)
## Attrib risk in the population * 0.36 (-5.18, 5.90)
## Attrib fraction in the population (%) 0.60 (-1.50, 2.66)
## -------------------------------------------------------------------
## Uncorrected chi2 test that OR = 1: chi2(1) = 0.313 Pr>chi2 = 0.576
## Fisher exact test that OR = 1: Pr>chi2 = 0.683
## Wald confidence limits
## CI: confidence interval
## * Outcomes per 100 population units
cont_table_education_female <- table(education = relevel(colon$education, "medium/high")[colon$sex=="Female"],
dead = relevel(colon$dead, "1")[colon$sex=="Female"])
strat_education_female<-epi.2by2(dat=cont_table_education_female, method="cohort.count")
strat_education_female
## Outcome + Outcome - Total Inc risk *
## Exposed + 39 15 54 72.22 (58.36 to 83.54)
## Exposed - 289 325 614 47.07 (43.06 to 51.10)
## Total 328 340 668 49.10 (45.25 to 52.96)
##
## Point estimates and 95% CIs:
## -------------------------------------------------------------------
## Inc risk ratio 1.53 (1.27, 1.85)
## Odds ratio 2.92 (1.58, 5.41)
## Attrib risk in the exposed * 25.15 (12.57, 37.74)
## Attrib fraction in the exposed (%) 34.83 (21.55, 45.86)
## Attrib risk in the population * 2.03 (-3.44, 7.51)
## Attrib fraction in the population (%) 4.14 (1.77, 6.46)
## -------------------------------------------------------------------
## Uncorrected chi2 test that OR = 1: chi2(1) = 12.566 Pr>chi2 = <0.001
## Fisher exact test that OR = 1: Pr>chi2 = <0.001
## Wald confidence limits
## CI: confidence interval
## * Outcomes per 100 population units
L’effetto dell’educazione negli uomini è maggiore rispetto alle donne: se si considerano gli uomini come classe di riferimento, l’interazione è positiva.
Si procede ora alla valutazione della variabile “Stadio”.
cont_table_stadio <- table(sex = colon$sex,
dead = relevel(colon$dead, "1"),
stadio = colon$Stadio)
strat_stadio<-epi.2by2(dat=cont_table_stadio , method="cohort.count")
strat_stadio$massoc.detail$RR.strata.wald
## est lower upper
## 1 0.5356668 0.3791356 0.756824
## 2 0.8676668 0.7451599 1.010314
## 3 0.9116279 0.6936136 1.198168
## 4 0.9023913 0.8238410 0.988431
strat_stadio$massoc.detail$OR.strata.wald
## est lower upper
## 1 0.3557377 0.2050549 0.6171485
## 2 0.7620488 0.5692676 1.0201148
## 3 0.7991543 0.4118332 1.5507434
## 4 0.3097668 0.1071449 0.8955670
strat_stadio$massoc.detail$wRR.homog
## test.statistic df p.value
## 1 8.281237 3 0.04054328
strat_stadio$massoc.detail$wOR.homog
## test.statistic df p.value
## 1 7.721106 3 0.05214136
strat_stadio
## Outcome + Outcome - Total Inc risk *
## Exposed + 328 340 668 49.10 (45.25 to 52.96)
## Exposed - 379 257 636 59.59 (55.66 to 63.43)
## Total 707 597 1304 54.22 (51.47 to 56.95)
##
##
## Point estimates and 95% CIs:
## -------------------------------------------------------------------
## Inc risk ratio (crude) 0.82 (0.75, 0.91)
## Inc risk ratio (M-H) 0.83 (0.75, 0.91)
## Inc risk ratio (crude:M-H) 0.99
## Odds ratio (crude) 0.65 (0.53, 0.81)
## Odds ratio (M-H) 0.63 (0.50, 0.80)
## Odds ratio (crude:M-H) 1.03
## Attrib risk in the exposed (crude) * -10.49 (-15.87, -5.11)
## Attrib risk in the exposed (M-H) * -10.06 (-15.27, -4.86)
## Attrib risk (crude:M-H) 1.04
## -------------------------------------------------------------------
## M-H test of homogeneity of IRRs: chi2(3) = 8.281 Pr>chi2 = 0.041
## M-H test of homogeneity of ORs: chi2(3) = 7.721 Pr>chi2 = 0.052
## Test that M-H adjusted OR = 1: chi2(1) = 14.826 Pr>chi2 = <0.001
## Wald confidence limits
## M-H: Mantel-Haenszel; CI: confidence interval
## * Outcomes per 100 population units
I test di omogeneità risultano significativi per entrambe le misure di effetto. Si procede al calcolo del valore dell’effetto separatamente per maschi e femmine.
model_bin_male <- glm(dead ~ Stadio, data=colon[colon$sex=="Male",], family="binomial")
summary(model_bin_male)
##
## Call:
## glm(formula = dead ~ Stadio, family = "binomial", data = colon[colon$sex ==
## "Male", ])
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.08552 0.18507 0.462 0.644
## StadioStadio II -0.03927 0.21405 -0.183 0.854
## StadioStadio III 0.37984 0.30748 1.235 0.217
## StadioStadio IV 2.89001 0.49440 5.846 5.05e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 858.14 on 635 degrees of freedom
## Residual deviance: 774.81 on 632 degrees of freedom
## AIC: 782.81
##
## Number of Fisher Scoring iterations: 5
exp(cbind("ODDS ratio" = coef(model_bin_male), confint.default(model_bin_male, level = 0.95)))
## ODDS ratio 2.5 % 97.5 %
## (Intercept) 1.089286 0.7578978 1.565572
## StadioStadio II 0.961490 0.6320406 1.462664
## StadioStadio III 1.462052 0.8002693 2.671097
## StadioStadio IV 17.993442 6.8278473 47.418162
model_bin_female <- glm(dead ~ Stadio, data=colon[colon$sex=="Female",], family="binomial")
summary(model_bin_female)
##
## Call:
## glm(formula = dead ~ Stadio, family = "binomial", data = colon[colon$sex ==
## "Female", ])
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.9480 0.2116 -4.481 7.42e-06 ***
## StadioStadio II 0.7225 0.2352 3.072 0.002129 **
## StadioStadio III 1.1892 0.3144 3.782 0.000156 ***
## StadioStadio IV 2.7516 0.3577 7.693 1.44e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 925.83 on 667 degrees of freedom
## Residual deviance: 841.18 on 664 degrees of freedom
## AIC: 849.18
##
## Number of Fisher Scoring iterations: 4
exp(cbind("ODDS ratio" = coef(model_bin_female), confint.default(model_bin_female, level = 0.95)))
## ODDS ratio 2.5 % 97.5 %
## (Intercept) 0.387500 0.255971 0.5866143
## StadioStadio II 2.059670 1.298870 3.2660997
## StadioStadio III 3.284457 1.773432 6.0829298
## StadioStadio IV 15.668203 7.772166 31.5861216
Gli uomini hanno un OR minore tra Stadio 1 e 2 e tra Stadio 1 e 3 rispetto alle donne. Hanno invece un OR maggiore tra Stadio 1 e 4 rispetto alle donne.
Si procede alla stima dei RR.
model_pois_male <- glm(I(as.numeric(dead)-1) ~ Stadio, data = colon[colon$sex=="Male",], family = poisson)
exp(cbind("Relative risk" = coef(model_pois_male), confint.default(model_pois_male, level = 0.95)))
## Relative risk 2.5 % 97.5 %
## (Intercept) 0.5213675 0.4056570 0.6700836
## StadioStadio II 0.9811902 0.7334593 1.3125939
## StadioStadio III 1.1782201 0.7975066 1.7406786
## StadioStadio IV 1.8249244 1.3256372 2.5122628
model_pois_female <- glm(I(as.numeric(dead)-1) ~ Stadio, data = colon[colon$sex=="Female",], family = poisson)
exp(cbind("Relative risk" = coef(model_pois_female), confint.default(model_pois_female, level = 0.95)))
## Relative risk 2.5 % 97.5 %
## (Intercept) 0.2792793 0.1964111 0.3971106
## StadioStadio II 1.5893203 1.0838833 2.3304530
## StadioStadio III 2.0051613 1.2606733 3.1893052
## StadioStadio IV 3.0742913 2.0377728 4.6380377
Gli uomini hanno in tutti i casi un RR minore rispetto alle donne: prendendo come riferimento il livello “Male”, si ha dunque una interazione positiva.
Si procede ora alla valutazione della variabile “age”.
model <- glm(dead ~ relevel(sex, "Male") + age, data=colon, family="binomial")
summary(model)
##
## Call:
## glm(formula = dead ~ relevel(sex, "Male") + age, family = "binomial",
## data = colon)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -3.265264 0.329073 -9.923 < 2e-16 ***
## relevel(sex, "Male")Female -0.499763 0.119351 -4.187 2.82e-05 ***
## age 0.077515 0.006909 11.219 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 1798.4 on 1303 degrees of freedom
## Residual deviance: 1621.4 on 1301 degrees of freedom
## AIC: 1627.4
##
## Number of Fisher Scoring iterations: 4
model2 <- glm(dead ~ relevel(sex, "Male") * age, data=colon, family="binomial")
summary(model2)
##
## Call:
## glm(formula = dead ~ relevel(sex, "Male") * age, family = "binomial",
## data = colon)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -3.71591 0.50153 -7.409 1.27e-13 ***
## relevel(sex, "Male")Female 0.30546 0.66477 0.459 0.646
## age 0.08734 0.01079 8.091 5.92e-16 ***
## relevel(sex, "Male")Female:age -0.01729 0.01406 -1.229 0.219
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 1798.4 on 1303 degrees of freedom
## Residual deviance: 1619.9 on 1300 degrees of freedom
## AIC: 1627.9
##
## Number of Fisher Scoring iterations: 4
anova(model,model2,test="LRT")
## Analysis of Deviance Table
##
## Model 1: dead ~ relevel(sex, "Male") + age
## Model 2: dead ~ relevel(sex, "Male") * age
## Resid. Df Resid. Dev Df Deviance Pr(>Chi)
## 1 1301 1621.4
## 2 1300 1619.9 1 1.5265 0.2166
Si osserva che l’interazione non è significativa, secondo il test LRT: age non è un modificatore di effetto.
model3 <- glm(dead ~ relevel(sex, "Male"), data=colon, family="binomial")
or_crude <- exp(cbind("Crude ODDS ratio" = coef(model3), confint.default(model3, level = 0.95)))
or_mh <- exp(cbind("MH ODDS ratio" = coef(model), confint.default(model, level = 0.95)))
ratio <- or_crude[2]/or_mh[2]
ratio
## [1] 1.078284
Il rapporto tra i due OR è pari a 1.08. Tenendo come valore limite per il confondimento uno scostamento del 10%, è possibile affermare che non c’è confondimento da parte della variabile “age”.
Risultano quindi modificatori di effetto le variabili “geneticm”, “education” e “Stadio”.
Poiché lo studio è uno studio di mortalità, si utilizza il modello di Cox per tenere conto anche dei diversi tempi di mortalità. Come covariate si scelgono le variabili risultate significative nel punto 10.
model_cox <- coxph(Surv(survtime, I(as.numeric(dead)-1)) ~ relevel(sex, "Male") + geneticm + education + Stadio + smoke + age, data=colon)
summary(model_cox)
## Call:
## coxph(formula = Surv(survtime, I(as.numeric(dead) - 1)) ~ relevel(sex,
## "Male") + geneticm + education + Stadio + smoke + age, data = colon)
##
## n= 1304, number of events= 707
##
## coef exp(coef) se(coef) z Pr(>|z|)
## relevel(sex, "Male")Female -0.229161 0.795201 0.075711 -3.027 0.002472 **
## geneticm1 0.651468 1.918356 0.105263 6.189 6.06e-10 ***
## educationmedium/high 0.230023 1.258629 0.120673 1.906 0.056628 .
## StadioStadio II 0.219986 1.246059 0.117630 1.870 0.061464 .
## StadioStadio III 0.559991 1.750656 0.151482 3.697 0.000218 ***
## StadioStadio IV 0.966904 2.629789 0.128614 7.518 5.57e-14 ***
## smokeyes 0.118113 1.125372 0.089690 1.317 0.187872
## age 0.030334 1.030799 0.003097 9.794 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## exp(coef) exp(-coef) lower .95 upper .95
## relevel(sex, "Male")Female 0.7952 1.2575 0.6855 0.9224
## geneticm1 1.9184 0.5213 1.5607 2.3579
## educationmedium/high 1.2586 0.7945 0.9935 1.5945
## StadioStadio II 1.2461 0.8025 0.9895 1.5692
## StadioStadio III 1.7507 0.5712 1.3009 2.3558
## StadioStadio IV 2.6298 0.3803 2.0438 3.3837
## smokeyes 1.1254 0.8886 0.9440 1.3417
## age 1.0308 0.9701 1.0246 1.0371
##
## Concordance= 0.657 (se = 0.011 )
## Likelihood ratio test= 211.3 on 8 df, p=<2e-16
## Wald test = 233.7 on 8 df, p=<2e-16
## Score (logrank) test = 241.9 on 8 df, p=<2e-16
I test di ipotesi riportano che il modello di Cox è significativo. In particolare, risultano significative le variabili “sex”, “geneticm”, “Stadio”, “age”. “education” è al limite della significatività. “smoke” risulta non significativamente associata.
L’Hazard Ratio risulta significativamente superiore a 1 per le variabili “geneticm”, “Stadio III”, “Stadio IV” e “age”. Queste variabili sono positivamente associate con il rischio di mortalità. L’Hazard Ratio risulta invece significativamente inferiore a 1 per la variabile “sex”. Le restanti variabili hanno un Hazard Ratio non significativamente diverso da 1.
Il modello di Cox assume che l’Hazard Ratio rimanga costante nel tempo. Si verifica questo assunto.
ph_test <- cox.zph(model_cox)
print(ph_test)
## chisq df p
## relevel(sex, "Male") 0.155 1 0.69
## geneticm 1.643 1 0.20
## education 1.224 1 0.27
## Stadio 5.276 3 0.15
## smoke 0.196 1 0.66
## age 2.292 1 0.13
## GLOBAL 11.370 8 0.18
par(mfrow=c(2,1), mar=c(4,5,1,1))
plot(ph_test)
L’assunto è verificato per tutte le variabili prese singolarmente e per il modello nel suo complesso. Infatti, dai dati si può notare come il p-value non risulti significativo.
Si inseriscono ora nel modello le modifiche di effetto studiate nel punto 11.
model_cox_2 <- coxph(Surv(survtime, I(as.numeric(dead)-1)) ~ relevel(sex, "Male") * geneticm + relevel(sex, "Male") * education + relevel(sex, "Male") * Stadio + smoke + age, data=colon)
summary(model_cox_2)
## Call:
## coxph(formula = Surv(survtime, I(as.numeric(dead) - 1)) ~ relevel(sex,
## "Male") * geneticm + relevel(sex, "Male") * education + relevel(sex,
## "Male") * Stadio + smoke + age, data = colon)
##
## n= 1304, number of events= 707
##
## coef exp(coef) se(coef)
## relevel(sex, "Male")Female -0.846156 0.429061 0.223167
## geneticm1 0.439997 1.552702 0.147239
## educationmedium/high 0.025085 1.025402 0.169617
## StadioStadio II -0.055337 0.946167 0.149072
## StadioStadio III 0.253719 1.288810 0.199608
## StadioStadio IV 0.818434 2.266948 0.165040
## smokeyes 0.108477 1.114579 0.090417
## age 0.030156 1.030616 0.003102
## relevel(sex, "Male")Female:geneticm1 0.393981 1.482872 0.211899
## relevel(sex, "Male")Female:educationmedium/high 0.420038 1.522020 0.243128
## relevel(sex, "Male")Female:StadioStadio II 0.641247 1.898848 0.246193
## relevel(sex, "Male")Female:StadioStadio III 0.712925 2.039949 0.310139
## relevel(sex, "Male")Female:StadioStadio IV 0.410593 1.507712 0.267468
## z Pr(>|z|)
## relevel(sex, "Male")Female -3.792 0.00015 ***
## geneticm1 2.988 0.00281 **
## educationmedium/high 0.148 0.88243
## StadioStadio II -0.371 0.71048
## StadioStadio III 1.271 0.20370
## StadioStadio IV 4.959 7.09e-07 ***
## smokeyes 1.200 0.23024
## age 9.721 < 2e-16 ***
## relevel(sex, "Male")Female:geneticm1 1.859 0.06299 .
## relevel(sex, "Male")Female:educationmedium/high 1.728 0.08405 .
## relevel(sex, "Male")Female:StadioStadio II 2.605 0.00920 **
## relevel(sex, "Male")Female:StadioStadio III 2.299 0.02152 *
## relevel(sex, "Male")Female:StadioStadio IV 1.535 0.12476
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## exp(coef) exp(-coef) lower .95
## relevel(sex, "Male")Female 0.4291 2.3307 0.2771
## geneticm1 1.5527 0.6440 1.1635
## educationmedium/high 1.0254 0.9752 0.7354
## StadioStadio II 0.9462 1.0569 0.7064
## StadioStadio III 1.2888 0.7759 0.8715
## StadioStadio IV 2.2669 0.4411 1.6404
## smokeyes 1.1146 0.8972 0.9336
## age 1.0306 0.9703 1.0244
## relevel(sex, "Male")Female:geneticm1 1.4829 0.6744 0.9789
## relevel(sex, "Male")Female:educationmedium/high 1.5220 0.6570 0.9451
## relevel(sex, "Male")Female:StadioStadio II 1.8988 0.5266 1.1720
## relevel(sex, "Male")Female:StadioStadio III 2.0399 0.4902 1.1108
## relevel(sex, "Male")Female:StadioStadio IV 1.5077 0.6633 0.8926
## upper .95
## relevel(sex, "Male")Female 0.6645
## geneticm1 2.0721
## educationmedium/high 1.4298
## StadioStadio II 1.2672
## StadioStadio III 1.9059
## StadioStadio IV 3.1327
## smokeyes 1.3307
## age 1.0369
## relevel(sex, "Male")Female:geneticm1 2.2463
## relevel(sex, "Male")Female:educationmedium/high 2.4512
## relevel(sex, "Male")Female:StadioStadio II 3.0765
## relevel(sex, "Male")Female:StadioStadio III 3.7464
## relevel(sex, "Male")Female:StadioStadio IV 2.5468
##
## Concordance= 0.663 (se = 0.011 )
## Likelihood ratio test= 226.9 on 13 df, p=<2e-16
## Wald test = 244.5 on 13 df, p=<2e-16
## Score (logrank) test = 257.4 on 13 df, p=<2e-16
I test di ipotesi riportano che il modello di Cox è significativo. In particolare, risultano significative le variabili “sex”, “geneticm”, “Stadio” per il quarto livello e “age”. “education” e “smoke” risultano non significativamente associate. In merito alle interazioni inserite nel modello, risultano significative quelle tra “sex” e “Stadio II” e tra “sex” e “Stadio III”.
L’Hazard Ratio risulta significativamente superiore a 1 per le variabili “geneticm”, “Stadio IV” e “age” e per le interazioni tra “sex” e “Stadio II” e tra “sex” e “Stadio III”. Queste variabili sono positivamente associate con il rischio di mortalità. L’Hazard Ratio risulta invece significativamente inferiore a 1 per la variabile “sex”. Le restanti variabili hanno un Hazard Ratio non significativamente diverso da 1.
anova(model_cox, model_cox_2, test="LRT")
## Analysis of Deviance Table
## Cox model: response is Surv(survtime, I(as.numeric(dead) - 1))
## Model 1: ~ relevel(sex, "Male") + geneticm + education + Stadio + smoke + age
## Model 2: ~ relevel(sex, "Male") * geneticm + relevel(sex, "Male") * education + relevel(sex, "Male") * Stadio + smoke + age
## loglik Chisq Df Pr(>|Chi|)
## 1 -4422.6
## 2 -4414.8 15.622 5 0.008009 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
I due modelli sono significativamente diversi.
ph_test_2 <- cox.zph(model_cox_2)
print(ph_test_2)
## chisq df p
## relevel(sex, "Male") 0.106 1 0.745
## geneticm 1.397 1 0.237
## education 1.283 1 0.257
## Stadio 5.286 3 0.152
## smoke 0.343 1 0.558
## age 2.484 1 0.115
## relevel(sex, "Male"):geneticm 1.230 1 0.267
## relevel(sex, "Male"):education 3.297 1 0.069
## relevel(sex, "Male"):Stadio 5.714 3 0.126
## GLOBAL 17.423 13 0.181
par(mfrow=c(3,1), mar=c(4,5,1,1), cex.lab = 0.8)
plot(ph_test_2)
Anche in questo caso l’assunto di costanza dell’Hazard Ratio risulta verificato.